-
Notifications
You must be signed in to change notification settings - Fork 17.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/http: return ErrNoCookie from Request.Cookie when name is ""
Request.Cookie(name string) will return the first cookie when cookie name is "". Since readCookies in file net/http/cookie.go at line 247 return all cookies when second parameter is a empty string. To fix it, Return ErrNoCookie from Request.Cookie(""), instead of the first cookie in the request. Fixes #53181 Change-Id: Ie623ca4c53da64ef7623a7863292a2d771f76832 GitHub-Last-Rev: 01098cd GitHub-Pull-Request: #53183 Reviewed-on: https://go-review.googlesource.com/c/go/+/409754 Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Damien Neil <dneil@google.com>
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters