Use is_tchar for cookie name check

This commit is contained in:
Martin Algesten
2021-03-24 19:39:11 +01:00
parent 5c9b1b9a0c
commit ea53c7cedd
2 changed files with 2 additions and 23 deletions

View File

@@ -472,28 +472,7 @@ fn is_cookie_rfc_compliant(cookie: &Cookie) -> bool {
// | "{" | "}" | SP | HT
fn is_valid_name(b: &u8) -> bool {
b.is_ascii()
&& !b.is_ascii_control()
&& !b.is_ascii_whitespace()
&& *b != b'('
&& *b != b')'
&& *b != b'<'
&& *b != b'>'
&& *b != b'@'
&& *b != b','
&& *b != b';'
&& *b != b':'
&& *b != b'\\'
&& *b != b'\"'
&& *b != b'/'
&& *b != b'['
&& *b != b']'
&& *b != b'?'
&& *b != b'='
&& *b != b'{'
&& *b != b'}'
&& *b != b' '
&& *b != b'\t'
header::is_tchar(b)
}
fn is_valid_value(b: &u8) -> bool {