-
-
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
Panic while formatting headers #1269
Comments
What is done in It is the case that header values can be sent in encodings that are not UTF-8. In that case, the bytes would need to be decoded according to some other knowledge. Perhaps because of this, |
let headers = req.headers()
.iter()
.map(|header| (header.name().to_string(), header.value_string()))
.collect(); As an alternative I could pack them as |
Oh, found (https://hyper.rs/hyper/master/hyper/header/struct.Raw.html), sorry. |
I think we can we assume |
Well, technically it is possible (https://github.com/3Hren/cocaine-http-proxy/blob/master/src/route/app.rs#L285), but looks weird. I can implement |
Woops, closed the wrong issue with that commit. |
Yea, providing |
For now, the new version of hyper won't be including the typed headers directly, so I'm closing this here as a won't fix. |
My hyper use case is a reverse proxy between HTTP and binary protocol. Unfortunately sometimes while converting headers into a vector of strings, it panics:
The text was updated successfully, but these errors were encountered: