]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: add case for TestParseSetCookie
authorJes Cok <xigua67damn@gmail.com>
Wed, 17 Apr 2024 18:29:55 +0000 (02:29 +0800)
committerGopher Robot <gobot@golang.org>
Thu, 18 Apr 2024 16:00:14 +0000 (16:00 +0000)
Updates #66008

Change-Id: Idd36a7f0b4128adfd0a3d7fe76eb6c2cea4306a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/579795
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Damien Neil <dneil@google.com>

src/net/http/cookie_test.go

index 5337c33aa90a28ee541c73d555026e2182f22a1f..ce5093c2ea4fa5b38f547b68e1eff6d3febfb674 100644 (file)
@@ -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,