-
Notifications
You must be signed in to change notification settings - Fork 183
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
Preserve header case #963
Comments
It would be cool, but at that point, you would need to use different data structures than those in the One last thing: those headers, in HTTP >=2, will need to be lowercase because the protocol requires it, so this should be specified in the documentation. |
That's the idea, yes. It's what I mean with "these headers would be stashed away in a special place in ureq-proto".
If you want to use the As an aside, the proposed solution – to uppercase portion of the header names – is not guaranteed to solve this problem for everyone. Some servers might require say The |
What I'm trying to say is that I wouldn't drop support for the |
From here algesten/ureq-proto#13:
The http crate does not allow us to preserve the header case. Needing to preserve header case breaks spec, which means ureq has no ambition to support it without extra work from the user. The escape hatch would be a new function
RequestBuilder::header_raw(name: &str, value: &[u8])
(name up for bike shedding). Value probably should be&[u8]
to maximize compatibility since the HTTP spec allows for values that are not utf-8.These headers would be stashed away in a special place in ureq-proto
Flow
/Call
that eschews going viaHeaderName
andHeaderValue
. They will be written to the request without any validation or conversion.The text was updated successfully, but these errors were encountered: