GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — http_parser: fix error return in `Finish()` by indutny · Pull Request #24738 · nodejs/node

Conversation

@indutny

@indutny indutny commented Nov 30, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

Fix: #24585

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot

nodejs-github-bot commented Nov 30, 2018

Copy link
Copy Markdown
Collaborator

@indutny build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/1735/pipeline

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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 implementation or http_parser binding. labels Nov 30, 2018
@indutny

indutny commented Nov 30, 2018

Copy link
Copy Markdown
Member Author

cc @nodejs/http

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny

indutny commented Nov 30, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

NOTE: there are few llhttp-specific fixes that I'd prefer to do separately. It is imperative to fix http_parser promptly, before diving into fixes for llhttp.

Update: No changes to llhttp needed, as it turned out today.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny indutny mentioned this pull request Nov 30, 2018
HTTP/1 request parsing framing error event #24585
Closed
@indutny
http: fix error return in Finish()
95bd7b2
`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.

Fix: nodejs#24585
@indutny
indutny force-pushed the fix/http-finish branch from db61379 to 95bd7b2 Compare November 30, 2018 06:58
@indutny
test: add test
12f9b6a
@indutny indutny mentioned this pull request Nov 30, 2018
http: make parser choice a runtime flag #24739
Closed
4 tasks done
This was referenced Dec 1, 2018
http: destroy the socket on parse error #24757
Closed
meta: express.js internals do not support Node.js 10+ expressjs/express#3813
Closed
lpinca
lpinca approved these changes Dec 2, 2018
View reviewed changes
Comment thread test/parallel/test-http-parser-finish-error.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@lpinca

lpinca commented Dec 2, 2018

Copy link
Copy Markdown
Member

CI: https://ci.nodejs.org/job/node-test-pull-request/19131/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny
fix nit
dc7beec
jasnell
jasnell approved these changes Dec 2, 2018
View reviewed changes
@indutny

indutny commented Dec 2, 2018

Copy link
Copy Markdown
Member Author

Landed in 84aba432bf, thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@indutny indutny closed this Dec 2, 2018
@indutny
indutny deleted the fix/http-finish branch December 2, 2018 17:51
indutny added a commit that referenced this pull request Dec 2, 2018
@indutny
http: fix error return in Finish()
175164e
`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.

Fix: #24585
PR-URL: #24738
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@joyeecheung joyeecheung mentioned this pull request Dec 5, 2018
CI failures: 20181201-20181205 nodejs/reliability#19
Closed
BridgeAR pushed a commit that referenced this pull request Dec 5, 2018
@indutny @BridgeAR
http: fix error return in Finish()
3fe3bc9
`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.

Fix: #24585
PR-URL: #24738
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Dec 5, 2018
v11.4.0 proposal #24854
Merged
4 tasks done
This was referenced Dec 7, 2018
2018-12-07 Version 11.4.0 (Current) @BridgeAR beevelop/docker-android-nodejs#261
Closed
2018-12-07 Version 11.4.0 (Current) @BridgeAR beevelop/docker-android-nodejs#262
Closed
2018-12-07 Version 11.4.0 (Current) @BridgeAR beevelop/docker-android-nodejs#263
Closed
2018-12-07 Version 11.4.0 (Current) @BridgeAR beevelop/docker-android-nodejs#264
Closed
2018-12-07 Version 11.4.0 (Current) @BridgeAR beevelop/docker-android-nodejs#265
Closed
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
@indutny @refack
http: fix error return in Finish()
1633365
`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.

Fix: nodejs#24585
PR-URL: nodejs#24738
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
mscdex added a commit to mscdex/io.js that referenced this pull request Feb 1, 2019
@mscdex
http: fix error check in Execute()
7586e6b
Refs: nodejs#24738
Fixes: nodejs#25858
This was referenced Feb 1, 2019
http: fix error check in Execute() #25863
Closed
[v8.x] http: fix error check in Execute() #25938
Closed
[v6.x] http: fix error check in Execute() #25939
Closed
BethGriggs pushed a commit that referenced this pull request Feb 5, 2019
@mscdex @BethGriggs
http: fix error check in Execute()
741c5ef
Refs: #24738
Fixes: #25858

PR-URL: #25863
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@BethGriggs BethGriggs added backported-to-v10.x and removed backported-to-v10.x labels Feb 12, 2019
rvagg pushed a commit that referenced this pull request Feb 28, 2019
@mscdex @rvagg
http: fix error check in Execute()
b9204db
Refs: #24738
Fixes: #25858

PR-URL: #25863
Reviewed-By: Fedor Indutny <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
mscdex added a commit to mscdex/io.js that referenced this pull request Feb 28, 2019
@mscdex
http: fix error check in Execute()
4ceb467
Refs: nodejs#24738
Fixes: nodejs#25858
mscdex added a commit to mscdex/io.js that referenced this pull request Mar 9, 2019
@mscdex
http: fix error check in Execute()
858004a
Refs: nodejs#24738
Fixes: nodejs#25858
BethGriggs pushed a commit that referenced this pull request Mar 11, 2019
@mscdex @BethGriggs
http: fix error check in Execute()
8080a9b
Refs: #24738
Fixes: #25858

PR-URL: #25939
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
BethGriggs pushed a commit that referenced this pull request Mar 20, 2019
@mscdex @BethGriggs
http: fix error check in Execute()
ac9b8f7
`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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Mar 26, 2019
v8.16.0 proposal #26933
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@lpinca lpinca lpinca approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. http_parser Issues and PRs related to the HTTP parser implementation or http_parser binding.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

HTTP/1 request parsing framing error event

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@indutny @nodejs-github-bot @lpinca @jasnell @BethGriggs
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.