Skip to content
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

Replace title-case option with public HeaderCaseMap? #2873

Closed
seanmonstar opened this issue May 26, 2022 · 5 comments
Closed

Replace title-case option with public HeaderCaseMap? #2873

seanmonstar opened this issue May 26, 2022 · 5 comments
Labels
B-breaking-change Blocked: this is an "API breaking change". B-rfc Blocked: More comments would be useful in determine next steps. C-feature Category: feature. This is adding a new feature.
Milestone

Comments

@seanmonstar
Copy link
Member

This is just a proposal, but if it seems like a good idea, doing it for 1.0 would be a good time, since we can actually remove the old support.

Initially we added support to title-case headers (#2313), which does work in a lot of situations, but it isn't always enough. So then we added partial support for preserving original header case (#2480). If we were to figure out the public API for this extension (#2695), we could remove the http1_header_title_case options.

@seanmonstar seanmonstar added C-feature Category: feature. This is adding a new feature. B-rfc Blocked: More comments would be useful in determine next steps. B-breaking-change Blocked: this is an "API breaking change". labels May 26, 2022
@seanmonstar seanmonstar added this to the 1.0 milestone May 26, 2022
@seanmonstar
Copy link
Member Author

@nox I think you might have mentioned something like this before in Discord, do you have any opinion?

@nox
Copy link
Contributor

nox commented Aug 22, 2022

With this, how would we force Hyper to send "Date" instead of "date"?

@seanmonstar
Copy link
Member Author

It could be done the same way as any other header, include an entry for DATE.

@seanmonstar seanmonstar modified the milestones: 1.0 RC1, 1.0 Final Aug 22, 2022
@nox
Copy link
Contributor

nox commented Aug 23, 2022

What about any other header added through middleware tower services etc? IMO we should keep that setting, as it is quite easy to end up with headers that are rejected by some cloud services for being sus

@seanmonstar
Copy link
Member Author

The comment from nox makes sense, without this option, "automatic" headers inside hyper and any headers in middleware could not be customized to certain style if needed. We can always deprecate this in the far future if a better way works someday.

@seanmonstar seanmonstar closed this as not planned Won't fix, can't repro, duplicate, stale Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-breaking-change Blocked: this is an "API breaking change". B-rfc Blocked: More comments would be useful in determine next steps. C-feature Category: feature. This is adding a new feature.
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants