-
Notifications
You must be signed in to change notification settings - Fork 191
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
Handle extra spaces in status line #216
Conversation
I think we might want to start a 9910-9112 branch and put there all changes like this one, once we are satisfied, we can ship it as a major. |
I wonder if, rather than trying to migrate the current RFC to the new one we could start fresh. Otherwise the parallel release line will be a mess to manage. |
I don't think we should release the new version until we are ready. I'm not sure if I would recommend implementing yet another http 1.1 parser. |
I agree. It's a monster thing to do. But the problem is that at the moment llhttp is mostly black magic as llparse is loosely documented and @indutny is absent. |
I'm adding this to the TSC agenda to discuss the state of maintenance on llhttp. |
@ronag Thanks, we definitely need this. |
That makes sense I guess. RFC7230 says that a status line is:
Would a PR which rejects a status line which does not conform to that be accepted? |
@emontnemery Yes, definitely. |
OK, a stricter parsing is implemented in #217 |
This has been superseded by #217. |
Handle extra spaces in status line
Background:
llhttp currently does not handle extra spaces in the status line correctly
This snippet:
HTTP/1.1 200 OK
Is parsed as status=0, v=1/1, reason =
' OK'
, which is clearly not correct.This PR lets the extra spaces slide, which the recipient MAY do: https://www.rfc-editor.org/rfc/rfc9112.html#name-status-line
Another option would be to reject the status line if it's not exactly to spec: