Accept more characters in the cookie-value

This commit is contained in:
Fabrice Reix 2021-01-22 07:49:48 +01:00
parent 88f94f97da
commit 379bd5aac2

View File

@ -165,13 +165,11 @@ fn cookie_value(reader: &mut Reader) -> ParseResult<'static, CookieValue> {
//let start = reader.state.clone();
let value = reader.read_while(|c| {
c.is_ascii_alphanumeric()
|| *c == '_'
|| *c == '-'
|| *c == '/'
|| *c == '%'
|| *c == '['
|| *c == ']'
|| *c == '.'
|| vec![
'!', '#', '$', '%', '&', '\'', '(', ')', '*', '+', '-', '.', '/', ':', '<', '=',
'>', '?', '@', '[', ']', '^', '_', '`', '~',
]
.contains(&c)
});
Ok(CookieValue { value })
}