-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add back the typed representation of the Link header #67
base: master
Are you sure you want to change the base?
Conversation
Thanks for the work in updating this code! I had disabled some of the typed headers when I felt the public interface was either exposing too many internal details (thus preventing future optimizations or refactors), or that involved too many allocations or copies. In the case of In these cases, perhaps the types should be |
Sounds reasonable! |
@seanmonstar implemented that, and also wrote a macro to generate the implementation of those two automatically. |
nevermind: #91 |
After the extraction of this crate from the main hyper codebase, the
Link
header was removed from the public API and moved into thedisabled/
directory. Having a parser for that header is a feature I think is really needed, as its syntax is not exactly trivial.This PR adds it back by moving the existing code from the
disabled/
directory tocommon/
, and updating it to work with the current codebase and API. Most of the PR consists of a straight port of the existing code, but I made two changes of my own:link
module. This mimics the behavior of theauthorization
module, as both of them have more than a single type representing the header.The PR is intended to be reviewed commit-by-commit.