]> Cypherpunks repositories - gostls13.git/commit
net/http: fix cookie value of "" being interpreted as empty string.
authorNicholas S. Husin <nsh@golang.org>
Wed, 3 Sep 2025 18:25:59 +0000 (14:25 -0400)
committerNicholas Husin <nsh@golang.org>
Thu, 4 Sep 2025 21:56:13 +0000 (14:56 -0700)
commit9d0829963ccab19093c37f21cfc35d019addc78a
tree1f194b7aaf281e29e29c4d639b369b48f5cfe3a6
parentddce0522bee36764c3b9529b8584c3d5b53c5dac
net/http: fix cookie value of "" being interpreted as empty string.

In issue #46443, we have established that double-quotes in cookie values
should be kept as part of the value, rather than being discarded.
However, we have missed the edge case of "" until now. This CL fixes
said edge case.

Fixes #75244

Change-Id: I627ad2376931514aa5dcc8961ad804e42b7d9434
Reviewed-on: https://go-review.googlesource.com/c/go/+/700755
Reviewed-by: Nicholas Husin <husin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Nicholas Husin <husin@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/net/http/cookie.go
src/net/http/cookie_test.go