From: Jes Cok Date: Wed, 17 Apr 2024 18:29:55 +0000 (+0800) Subject: net/http: add case for TestParseSetCookie X-Git-Tag: go1.23rc1~587 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=276d28fe40dc8b4e0a9964a52dec426d4ed6fff0;p=gostls13.git net/http: add case for TestParseSetCookie Updates #66008 Change-Id: Idd36a7f0b4128adfd0a3d7fe76eb6c2cea4306a3 Reviewed-on: https://go-review.googlesource.com/c/go/+/579795 Reviewed-by: Damien Neil Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Auto-Submit: Damien Neil --- diff --git a/src/net/http/cookie_test.go b/src/net/http/cookie_test.go index 5337c33aa9..ce5093c2ea 100644 --- a/src/net/http/cookie_test.go +++ b/src/net/http/cookie_test.go @@ -826,6 +826,12 @@ func TestParseSetCookie(t *testing.T) { line: `special-8=","`, cookie: &Cookie{Name: "special-8", Value: ",", Raw: `special-8=","`}, }, + // Make sure we can properly read back the Set-Cookie headers + // for names containing spaces: + { + line: `special-9 =","`, + cookie: &Cookie{Name: "special-9", Value: ",", Raw: `special-9 =","`}, + }, { line: "", err: errBlankCookie,