diff options
| author | John Kelly <jkelly@squarespace.com> | 2021-07-29 15:47:23 -0400 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2021-10-06 23:26:57 +0000 |
| commit | c8dd89ed3dde52933d981d7d7c4c200160f47ec3 (patch) | |
| tree | fc8759b37552fd6a61f7c3c299528d36ea9c2f87 /src/runtime/malloc.go | |
| parent | f3758443424dd6e411e2ac0108efdefd2ad7b294 (diff) | |
| download | go-c8dd89ed3dde52933d981d7d7c4c200160f47ec3.tar.xz | |
net/http: add Cookie.Valid method
The (*http.Cookie).String method used by SetCookie will silently discard
or sanitize any fields it deems invalid, making it difficult to tell
whether a cookie will be sent as expected.
This change introduces a new (*http.Cookie).Valid method which may be
used to check if any cookie fields will be discarded or sanitized prior
to calling (*http.Cookie).String.
Fixes #46370
Change-Id: I2db80078de190d267a9c675a9717c8be8acc8704
Reviewed-on: https://go-review.googlesource.com/c/go/+/338590
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Cherry Mui <cherryyz@google.com>
Trust: Damien Neil <dneil@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Diffstat (limited to 'src/runtime/malloc.go')
0 files changed, 0 insertions, 0 deletions
