Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetCookie broken #2214

Closed
sguillia opened this issue Jan 20, 2020 · 2 comments · Fixed by #2217
Closed

SetCookie broken #2214

sguillia opened this issue Jan 20, 2020 · 2 comments · Fixed by #2217

Comments

@sguillia
Copy link

Hello

It seems you have made a breaking change 4 hours ago (our CI broke)

In source file, SetCookie expects 8 parameters
https://github.com/gin-gonic/gin/blob/master/context.go#L778

In the README, SetCookie expects 7 parameters
https://github.com/gin-gonic/gin/blob/master/README.md

c.SetCookie("gin_cookie", "test", 3600, "/", "localhost", false, true)

On the CI

... not enough arguments in call to c.SetCookie
	have (string, string, number, string, string, bool, bool)
	want (string, string, int, string, string, http.SameSite, bool, bool)

Could you please update the README so that it is consistent with the source code? Otherwise, it is hard to find out where the problem comes from, and which one is the good prototype :-)

From commit f94406a

Best

@tmathews
Copy link

Oof

@owenwatts
Copy link

when i go get the 1.5.0 version, i can't get newest code with samesite option in SetCookie funciton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants