b2052a433fd151d7d745ee9c5b27a2031db1dc32
Add a new extension type `hyper::ext::ReasonPhrase` gated by either the `ffi` or `http1` Cargo features. When enabled, store any non-canonical reason phrases in this extension when parsing responses, and write this reason phrase instead of the canonical reason phrase when emitting responses. Reason phrases are a disused corner of the spec that implementations ought to treat as opaque blobs of bytes. Unfortunately, real-world traffic sometimes does depend on being able to inspect and manipulate them. Non-canonical reason phrases are checked for validity at runtime to prevent invalid and dangerous characters from being emitted when writing responses. An `unsafe` escape hatch is present for hyper itself to create reason phrases that have been parsed (and therefore implicitly validated) by httparse.
hyper
A fast and correct HTTP implementation for Rust.
- HTTP/1 and HTTP/2
- Asynchronous design
- Leading in performance
- Tested and correct
- Extensive production use
- Client and Server APIs
Get started by looking over the guides.
"Low-level"
hyper is a relatively low-level library, meant to be a building block for libraries and applications.
If you are looking for a convenient HTTP client, then you may wish to consider reqwest. If you are looking for a convenient HTTP server, then you may wish to consider warp. Both are built on top of this library.
Contributing
To get involved, take a look at CONTRIBUTING.
If you prefer chatting, there is an active community in the Discord server.
License
hyper is provided under the MIT license. See LICENSE.
Languages
Rust
94.5%
C
5.2%
Shell
0.3%