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
net/http/cookiejar: strips additional information #39420
Comments
Thanks. To make this issue more actionable, can you please provide answers to these questions:
|
Certainly. (my misconception was based on me not realising that the jar prunes all expired cookies.)
I expected to get a
I got Now, I've resolved it like this (but I miss being able to know for how long the session is going to be valid, so I can refresh it deterministically, rather than on a hunch/fixed interval/etc..)
|
I believe I hit the same issue. Use case: I have a CLI application that is trying to preserve and reuse session cookies between individual runs, so on application shutdown I'm serializing cookies from the jar and then on relaunch re-populating jar with deserialized cookies. Current behavior is not a show-stopper, since I can set some sensible defaults for other properties - however it's not clear what's the intent for stripping all extra information from a cookie. Looking around GitHub I found couple instances where:
On a positive note: I saw many cases where all folks are using were indeed name/value. |
@dmitshur still waiting for more info? Or this just haven't got updated labels..? ;) |
I'm not familiar with why the current behavior was chosen and may be missing something, but I don't see any reason why cc @vdobler, who wrote the initial implementation of |
The reason why
E.g. RFC 6265 requires to delete expired cookies the moment they expire (if I remember correctly). There where several long discussions with Nigel on if / how to provide persistence. All fruitless. There are forks of While technically true that A real fix would be a solution to #17587 : How to read data out of a |
go/src/net/http/cookiejar/jar.go
Line 219 in 50bd1c4
Is there a purpose to leave out everything apart from the name and value here?
I'd like to know how long time a cookie has left to live..
The text was updated successfully, but these errors were encountered: