Replies: 2 comments
|
Hey there! Yea, I've seen interest in this before. Let me grab together the current status. At one point, we did exactly as this described for curl, or at least, half of it: putting The second half is much more nuanced, that which of using the extension type for the bytes to write. I could perhaps be convinced otherwise, but it's a delicate matter. The concern I have is that of writing bytes that imply different semantics of the body than what hyper understands, and that confusion resulting in message splitting. Another approach which is much safer would be the proposed extension types for "original header order" and "original header case" (see #2695). These types would simply define how hyper received the original bytes, and also how hyper should iterate and case the bytes. The blockers to those types so far has been coming up with a forwards-compatibly public API. |
Is there a separate issue for tracking the "original header order"? Fwiw, my use case is a proxy with security features that requires reading headers as they came over the wire. Here's a relevant blog post on the topic: https://www.f5.com/company/blog/detecting-phantomjs-based-visitors |
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
This is a hard blocker to use Hyper as a proxy server without worrying about the unexpected normalization by Hyper.
We want to use Hyper as a proxy server in front of the existing services, which are very old. The old services have its own custom logic to support the requests even for non-RFC compliant requests to have backward compatibility. Using Hyper as a proxy has a potential problem since it has its own parsing and normalization logic, such as lower casing of the header name.
The best situation is that Hyper can capture the raw head bytes after parsing it and Hyper client supports it to encode it to bytes instead of using the normalized request. This helps us to avoid any issues in normalization since we will forward the raw bytes.
Describe the solution you'd like
sliceof the read_bytes after parsing the headers as a request extensionDescribe alternatives you've considered
All reactions