-
Notifications
You must be signed in to change notification settings - Fork 42
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
status-code parsing #684
Comments
|
Is there anything in the spec that you think needs to change? |
|
I guess it would be nice to at least clarify the range. In particular for:
The specification talks about classes of status codes, but doesn't seem to deal with the 0xx and 6xx-9xx classes. And I guess I'm wondering if other clients have similar parsing oddities due to having to copy browser behavior at which point more changes might be warranted. |
|
We currently say:
Do we really need to say that there are no other classes? |
|
I think the problem is more that nothing says that 600 is not a status code, no? Or how to treat it. |
|
I thought we did say that, but it seems we do not. Good catch. |
|
Oops, we forgot that status-code needs to be defined in Semantics, not HTTP/1.1. It is defined as 3DIGIT. I think we should explicitly forbid anything that isn't 3DIGIT, along with 0xx. The other three-digit codes are often used internally by client libraries and web frameworks. I know that's what I did for libwww-perl. Should we reserve those for internal use? |
|
Ack. Questions:
|
Yes. (There are no integers in HTTP/1.x, but the values are usually manipulated as integers.)
The current requirement is that it be three digits and a client MUST understand the first digit. I don't think we ever forbid the use of codes outside of that range, but we knew that we couldn't define new codes outside of that range because of internal library usage (not on the wire). We should probably refine this in prose instead of restricting the ABNF. |
Clarify status code range (fixes #684)
I looked into status-code a tiny bit and noticed that browsers do not have fully conforming parsers (quelle surprise, I know). I only looked at H/1.
This might not warrant any changes, but if people are writing tests this might be good to take into account, especially for newer versions of HTTP.
whatwg/fetch#1142
The text was updated successfully, but these errors were encountered: