@@ -1095,13 +1095,13 @@ def test_parse_set_cookie_headers_date_formats_with_attributes() -> None:
10951095@pytest .mark .parametrize (
10961096 ("header" , "expected_name" , "expected_value" , "expected_coded" ),
10971097 [
1098- # Test cookie values with octal escape sequences
1099- (r'name="\012newline\012 "' , "name" , "\n newline \n " , r'"\012newline\012 "' ),
1098+ # Test cookie values with octal escape sequences (printable chars only)
1099+ (r'name="\050parens\051 "' , "name" , "(parens) " , r'"\050parens\051 "' ),
11001100 (
1101- r'tab ="\011separated\011values "' ,
1102- "tab " ,
1103- "\t separated \t values " ,
1104- r'"\011separated\011values "' ,
1101+ r'punct ="\053plus\053values "' ,
1102+ "punct " ,
1103+ "+plus+values " ,
1104+ r'"\053plus\053values "' ,
11051105 ),
11061106 (
11071107 r'mixed="hello\040world\041"' ,
@@ -1110,10 +1110,10 @@ def test_parse_set_cookie_headers_date_formats_with_attributes() -> None:
11101110 r'"hello\040world\041"' ,
11111111 ),
11121112 (
1113- r'complex="\042quoted\042 text with \012 newline "' ,
1113+ r'complex="\042quoted\042 text with \055 hyphen "' ,
11141114 "complex" ,
1115- '"quoted" text with \n newline ' ,
1116- r'"\042quoted\042 text with \012 newline "' ,
1115+ '"quoted" text with - hyphen ' ,
1116+ r'"\042quoted\042 text with \055 hyphen "' ,
11171117 ),
11181118 ],
11191119)
0 commit comments