[v8.x] http: fix error check in `Execute()` by mscdex · Pull Request #25938 · nodejs/node

@mscdex added the http

Issues or PRs related to the http subsystem.

label

Feb 5, 2019

@nodejs-github-bot nodejs-github-bot added c++

Issues and PRs that require attention from people who are familiar with C++.

http_parser

Issues and PRs related to the HTTP Parser dependency or the http_parser binding.

v8.x labels

Feb 5, 2019

@addaleax addaleax changed the title http: fix error check in Execute() [v8.x] http: fix error check in Execute()

Feb 9, 2019

@mscdex

BethGriggs

BethGriggs pushed a commit that referenced this pull request

Mar 20, 2019
`http_parser_execute(..., nullptr, 0)` returns either `0` or `1`. The
expectation is that no error must be returned if it is `0`, and if
it is `1` - a `Error` object must be returned back to user.

The introduction of `llhttp` and the refactor that happened during it
accidentally removed the error-returning code. This commit reverts it
back to its original state.

Backport-PR-URL: #25938
Fix: #24585
PR-URL: #24738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

@mscdex mscdex deleted the v8-http-fix-parser-execute-error-check branch

March 20, 2019 20:44