mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update Hyper and OpenSSL
This commit is contained in:
parent
f66cae3f96
commit
e527c9a991
32 changed files with 298 additions and 396 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue