mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Correct cookie handling behavior
- Cookies with empty values are not to be ignored as per RFC6265 - A space should separate two cookie-pairs as per RFC6265 section 4.2.1
This commit is contained in:
parent
8b9b36454c
commit
4fb53c8256
1 changed files with 1 additions and 5 deletions
|
@ -58,10 +58,6 @@ impl CookieStorage {
|
|||
return;
|
||||
}
|
||||
|
||||
if cookie.cookie.value.is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Step 11
|
||||
if let Some(old_cookie) = old_cookie.unwrap() {
|
||||
// Step 11.3
|
||||
|
@ -108,7 +104,7 @@ impl CookieStorage {
|
|||
// Step 4
|
||||
(match acc.len() {
|
||||
0 => acc,
|
||||
_ => acc + ";"
|
||||
_ => acc + "; "
|
||||
}) + &c.cookie.name + "=" + &c.cookie.value
|
||||
};
|
||||
let result = url_cookies.iter_mut().fold("".to_owned(), reducer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue