Skip to content

Commit

Permalink
fix: set max for max cookie number to math.MaxInt (#16388)
Browse files Browse the repository at this point in the history
* fix: set max for max cookie number to `math.MaxInt32`

Signed-off-by: OneMatchFox <[email protected]>

* refactor: set max for max cookie number to `math.MaxInt`

Co-authored-by: gdsoumya <[email protected]>
Signed-off-by: Brian Fox <[email protected]>

---------

Signed-off-by: OneMatchFox <[email protected]>
Signed-off-by: Brian Fox <[email protected]>
Co-authored-by: gdsoumya <[email protected]>
  • Loading branch information
onematchfox and gdsoumya authored Nov 20, 2023
1 parent 841339d commit 61abc80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (

// max number of chunks a cookie can be broken into. To be compatible with
// widest range of browsers, you shouldn't create more than 30 cookies per domain
var maxCookieNumber = env.ParseNumFromEnv(common.EnvMaxCookieNumber, 20, 0, math.MaxInt64)
var maxCookieNumber = env.ParseNumFromEnv(common.EnvMaxCookieNumber, 20, 0, math.MaxInt)

// MakeCookieMetadata generates a string representing a Web cookie. Yum!
func MakeCookieMetadata(key, value string, flags ...string) ([]string, error) {
Expand Down

0 comments on commit 61abc80

Please sign in to comment.