-
Notifications
You must be signed in to change notification settings - Fork 320
http::header::HeaderValue rejects bytes that WHATWG specs and WPT tests now allow #376
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
Comments
Is there a reference somewhere when that change was made? RFC 7230 requires header values to be "VCHAR or obs-text". |
whatwg/fetch#332 is referenced in the commit that added the WPT test. |
@seanmonstar is there any changes that are required to the PR? Are there issues or concerns with landing this? |
I prefix this with "my opinion may be wrong". I'm not a fan of the Fetch spec re-defining parts of the HTTP spec. I realize that WHATWG is basically the browser makers defining the reality of how web browsers already operate, but there's more to the Internet than just browsers. The IETF makes the HTTP specs, and it makes more sense to me if WHATWG were to get the HTTP specs updated, instead of having a competing section as part of the JavaScript |
@seanmonstar may be right as to the overall general case. It does make sense to think of the non-conformant things that browsers have to allow for backwards compatibility as a special case, and since Hyper isn't making a browser, there's no inherent reason why Hyper has to be the one going out of their way to support that exceptional case. It would be nice if there were a feature flag or something, but I do can see value in enforcing RFC validity rules as a default, since someone writing e.g. a Web service client isn't going to want to get tripped up by browser legacy weirdness. |
Recent HTTP spec has been changed:
|
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 just to
http/src/header/value.rs
Lines 557 to 560 in 455f33e
The text was updated successfully, but these errors were encountered: