http: fix error check in `Execute()` · nodejs/node@ac9b8f7 · GitHub
Skip to content

Commit ac9b8f7

Browse files
mscdexBethGriggs
authored andcommitted
http: fix error check in Execute()
`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>
1 parent 1d86261 commit ac9b8f7

2 files changed

Lines changed: 42 additions & 3 deletions

File tree

src/node_http_parser.cc

Lines changed: 28 additions & 2 deletions
Lines changed: 14 additions & 1 deletion

0 commit comments

Comments
 (0)