Auto merge of #6302 - eddyb:preserve-ua-on-redirect, r=nox

This unblocks facebook.com's feed, after a few months of it being accidentally broken.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6302)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-06-12 19:51:26 -06:00
commit 8063e34235
4 changed files with 44 additions and 3 deletions

View file

@ -259,7 +259,9 @@ impl ResourceManager {
}
}
self.user_agent.as_ref().map(|ua| load_data.headers.set(UserAgent(ua.clone())));
self.user_agent.as_ref().map(|ua| {
load_data.preserved_headers.set(UserAgent(ua.clone()));
});
fn from_factory(factory: fn(LoadData, LoadConsumer, Arc<MIMEClassifier>))
-> Box<FnBox(LoadData, LoadConsumer, Arc<MIMEClassifier>) + Send> {