Update Hyper and OpenSSL

This commit is contained in:
ddh 2017-01-11 12:07:36 +00:00 committed by Anthony Ramine
parent f66cae3f96
commit e527c9a991
32 changed files with 298 additions and 396 deletions

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use cookie::Cookie;
use cookie_rs;
use cookie_storage::CookieStorage;
use fetch::methods::{should_be_blocked_due_to_bad_port, should_be_blocked_due_to_nosniff};
use http_loader::{is_redirect_status, set_request_cookies};
@ -596,8 +597,10 @@ fn http_network_fetch(url: &ServoUrl,
if let Some(cookies) = response.headers.get::<SetCookie>() {
let mut jar = cookie_jar.write().unwrap();
for cookie in &**cookies {
if let Some(cookie) = Cookie::new_wrapped(cookie.clone(), url, CookieSource::HTTP) {
jar.push(cookie, url, CookieSource::HTTP);
if let Ok(cookie) = cookie_rs::Cookie::parse(&**cookie) {
if let Some(cookie) = Cookie::new_wrapped(cookie.into_owned(), url, CookieSource::HTTP) {
jar.push(cookie, url, CookieSource::HTTP);
}
}
}
}