http
http copied to clipboard
Rust HTTP types
Hey, I read that default port was rejected in https://github.com/hyperium/http/issues/11. However, the current API has `pub fn port(&self) -> Option` but it's not possible to distinguish when invalid port number...
This changes the URI parser to allow URIs of the forms * scheme:/absolute/path * scheme:///absolute/path It does impact HTTP URI parsing in that HTTP URIs without an authority part are...
https://fetch.spec.whatwg.org/#concept-header-value currently allows most bytes in the 1-31 range or 127, and https://github.com/web-platform-tests/wpt/blob/master/fetch/api/headers/header-values.html expects these bytes to roundtrip safely through request and response headers. The required code change is probably...
Trying to parse an URI like `unix:///tmp/agent.sock` or `unix:/tmp/agent.sock`, that has a schema and not an authority, produces an Error `InvalidaUri(InvalidFormat)`. There is no restriction defined in the [URI standard](https://tools.ietf.org/html/rfc3986#section-3)...
When a string value may be a constant or may be formatted dynamically, it's often useful to use `std::borrow::Cow` to represent that value. That way, when the string is a...
I propose that we move forward to allow `Request` to `impl Clone`. The big blocker here is that `extensions` is not clonable. This could be fixed by making a AnyClone...
This closes #285.
According to [RFC2817, Section 5.2](https://datatracker.ietf.org/doc/html/rfc2817#section-5.2) the URI of the CONNECT method should be only the authority part: > A CONNECT method requests that a proxy establish a tunnel connection >...
URIs that reference resources on a local filesystem often use URIs of the format `://`. If the path is absolute that leads to URIs with 3 slashes after the scheme...
It'd be really handy to replace the current builders with a set of builders for Request, Response, and URI that track the builder's state using some sort of typestate, allowing...