-
-
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
More allocator friendly Header definitions #1104
Comments
Agreed. I starting with the most common,
|
@seanmonstar, I'm looking to start contributing here. Mind if I take a stab at it and convert over those headers you mentioned if you're not already working on it? |
@mcarlin That'd be great! I turned the list into checkboxes, ideally we can keep them up to date. |
This change was suggested in hyperium#1104 . As suggested I've also made the fields private and added a constructor.
…onstructors Namely: - Location - Referrer - Server - UserAgent This change was suggested in [hyperium#1104]. BREAKING CHANGES: Old code that creates the header structs directly will stop working.
Change the internal implementation of some simple headers to make them more allocator friendly. Also add a constructor method to allow changing the implementation in the future again. The headers are: - Location - Referrer - Server - UserAgent This change was suggested in [hyperium#1104]. BREAKING CHANGES: - Old code that creates the header structs directly will stop working. - It's not possible to implement DerefMut for a Cow<'static,str>. Code that needs to modify header after creation will stop working.
Change the internal implementation of some simple headers to make them more allocator friendly. Also add a constructor method to allow changing the implementation in the future again. The headers are: - Location - Referrer - Server - UserAgent This change was suggested in [hyperium#1104]. BREAKING CHANGES: - Old code that creates the header structs directly will stop working. - It's not possible to implement DerefMut for a Cow<'static,str>. Code that needs to modify header after creation will stop working.
The list of headers I made have all been converted. If there's changes want to a specific header, lets open specific issues. Thanks! |
I was looking at TechEmpower/FrameworkBenchmarks#2611 the other day and I noticed there's no way of using some Header types without allocating, like the
Server
header in the linked example.It's not a problem per se but it's probably worth discussing as setting N headers could potentially allocate N times.
The text was updated successfully, but these errors were encountered: