合并主线#1
Open
willingbug wants to merge 16 commits into
Open
Conversation
This allows "make install; make install" to work properly. Retrieved from: https://git.buildroot.net/buildroot/tree/package/libhttpparser/0001-Use-f-option-when-calling-ln-at-install-time.patch PR-URL: #492 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Renaud AUBIN <root@renaud.io> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
`Transfer-Encoding` header might have multiple codings in it. Even
though llhttp cares only about `chunked`, it must check that `chunked`
is the last coding (if present).
ABNF from RFC 7230:
```
Transfer-Encoding = *( "," OWS ) transfer-coding *( OWS "," [ OWS
transfer-coding ] )
transfer-coding = "chunked" / "compress" / "deflate" / "gzip" /
transfer-extension
transfer-extension = token *( OWS ";" OWS transfer-parameter )
transfer-parameter = token BWS "=" BWS ( token / quoted-string )
```
However, if `chunked` is not last - llhttp must assume that the encoding
and size of the body is unknown (according to 3.3.3 of RFC 7230) and
read the response until EOF. For request - the error must be raised for
an unknown `Transfer-Encoding`.
Furthermore, 3.3.3 of RFC 7230 explicitly states that presence of both
`Transfer-Encoding` and `Content-Length` indicates the smuggling attack
and "ought to be handled as an error".
For the lenient mode:
* Unknown `Transfer-Encoding` in requests is not an error and request
body is simply read until EOF (end of connection)
* Only `Transfer-Encoding: chunked` together with `Content-Length` would
result an error (just like before the patch)
PR-URL: nodejs-private/http-parser-private#4
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
It doesn't matter yet, but two tests had the same name, and same test position macro. PR-URL: #497 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Fix ABI breakage introduced in commit 7d5c99d ("Support multi-coding Transfer-Encoding") by undoing the change in `sizeof(http_parser)`. Restore the size of the `flags` field and shrink the `index` field from 7 to 5 bits. It track strings up to `strlen("Transfer-Encoding")` bytes so 2^5 == 32 is wide enough. Fixes: #502 PR-URL: #503 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
PR-URL: #506 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
PR-URL: #508 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
PR-URL: #184 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: #511 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The test suite did very little validation of the Content-Length field until now. Verify for each request and response that the parsed numeric value matches the value from the header field. PR-URL: #519 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
I'm moving on and as the last (semi-)active maintainer, that means http-parser is now effectively unmaintained. Refs: #522 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.