-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
hyper::header::Cookie not hashable #1139
Comments
I assume you mean that there isn't a way to store and access cookies by their name. That's correct, it is likely out of scope for hyper. There is a lot of good work in the cookie crate. |
Cookies are key to web server/client communication. I agree that session management, keeping track of cookies etc... is out of scope for hyper, and as noted the cookie crate does a great job for this. But I think that any apps running on top of a web server will eventually need to look at cookies from requests, for all kind of reasons, and for things simpler than session management. If splitting on the equal sign and provide a map to the cookies is out of scope, why wasn't splitting on the semi-colon and provide individual cookie "strings" not out of scope. The effort to add this seems minimal, it's basically one struct and a couple of methods,. I'm happy to add a PR for this. Let me know your thoughts. |
Hyper actually used to depend on the cookie crate, and so you would have I wouldn't say that parsing the cookie string into a struct with |
This is being revisted in #1145. |
From what I can see hyper::header::Cookie provides cookies as separate "key=value" element, but there is no way to access the keys directly (let me know if I'm missing something here). I think there would be value to provide a way to access Cookies directly bye keys right in hyper rather than as a separate crate.
Are there reasons for not providing this? Is it worth adding a PR for it? Should this be done as part of hyper::header::Cookie, or as a separate struct (say hyper::header::hashedCookie)?
The text was updated successfully, but these errors were encountered: