net/http: SetCookie 'Max-Age' field can not be empty #15742
Closed
Labels
Comments
@nigeltao, are you still the cookie monster? |
I'm a little confused as to what the original post is asking for. http.SetCookie takes a *Cookie as an argument, and the Cookie struct type has a MaxAge field. https://golang.org/pkg/net/http/#Cookie says:
Do either of the first two do what you want? |
http://tools.ietf.org/html/rfc6265#section-4.1.2.2 |
@nigeltao thank you |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I need to set a cookie which expired after closing browser.
Chrome browser just work well when 'Max-Age' field is empty.
So I think "http.SetCookie" function must support 'Max-Age' field to keep empty.
The text was updated successfully, but these errors were encountered: