Skip to content

http: make --insecure-http-parser configurable per-stream or per-server - #31448

Closed
addaleax wants to merge 4 commits into
nodejs:masterfrom
addaleax:insecure-http-parser
Closed

http: make --insecure-http-parser configurable per-stream or per-server#31448
addaleax wants to merge 4 commits into
nodejs:masterfrom
addaleax:insecure-http-parser

Conversation

@addaleax

Copy link
Copy Markdown
Member

From the issue:

Some servers deviate from HTTP spec enougth that Node.js can't
communicate with them, but "work" when --insecure-http-parser
is enabled globally. It would be useful to be able to use this
mode, as a client, only when connecting to known bad servers.

This is largely equivalent to #31446
in terms of code changes.

Fixes: #31440
Refs: #31446

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

From the issue:
> Some servers deviate from HTTP spec enougth that Node.js can't
> communicate with them, but "work" when `--insecure-http-parser`
> is enabled globally. It would be useful to be able to use this
> mode, as a client, only when connecting to known bad servers.
This is largely equivalent to nodejs#31446
in terms of code changes.
Fixes: nodejs#31440
Refs: nodejs#31446
@addaleaxaddaleax added http Issues or PRs related to the http subsystem. semver-minor PRs that contain new features and should be released in the next minor version. labels Jan 21, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@sam-githubsam-github left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for the code, but I suggested a doc clarification (it would apply to both http and https obviously).

Comment threaddoc/api/http.md Outdated
@addaleaxaddaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jan 22, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threaddoc/api/http.md Outdated
Comment threaddoc/api/http.md Outdated
…er-server
Co-Authored-By: Rich Trott <rtrott@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

addaleax added a commit that referenced this pull request Jan 24, 2020
From the issue:
> Some servers deviate from HTTP spec enougth that Node.js can't
> communicate with them, but "work" when `--insecure-http-parser`
> is enabled globally. It would be useful to be able to use this
> mode, as a client, only when connecting to known bad servers.
This is largely equivalent to #31446
in terms of code changes.
Fixes: #31440
Refs: #31446
PR-URL: #31448
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@addaleax

Copy link
Copy Markdown
MemberAuthor

Landed in d6f1e39, thanks for the reviews!

@addaleax
addaleax deleted the insecure-http-parser branch January 24, 2020 16:55
addaleax added a commit to sam-github/node that referenced this pull request Jan 24, 2020
From the issue:
> Some servers deviate from HTTP spec enougth that Node.js can't
> communicate with them, but "work" when `--insecure-http-parser`
> is enabled globally. It would be useful to be able to use this
> mode, as a client, only when connecting to known bad servers.
This is largely equivalent to nodejs#31446
in terms of code changes.
Fixes: nodejs#31440
Refs: nodejs#31446
PR-URL: nodejs#31448
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
addaleax added a commit to addaleax/node that referenced this pull request Jan 24, 2020
From the issue:
> Some servers deviate from HTTP spec enougth that Node.js can't
> communicate with them, but "work" when `--insecure-http-parser`
> is enabled globally. It would be useful to be able to use this
> mode, as a client, only when connecting to known bad servers.
This is largely equivalent to nodejs#31446
in terms of code changes.
Fixes: nodejs#31440
Refs: nodejs#31446
PR-URL: nodejs#31448
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@addaleax

Copy link
Copy Markdown
MemberAuthor

This should land wherever --insecure-http-parser is provided, imo – v12.x backport is in #31500, v10.x backport is added to #30471 (along with the flag itself)

zsw007 added a commit to ibmruntimes/node that referenced this pull request Feb 11, 2020
Backport 7fc5656
Original commit message:
From the issue:
> Some servers deviate from HTTP spec enougth that Node.js can't
> communicate with them, but "work" when `--insecure-http-parser`
> is enabled globally. It would be useful to be able to use this
> mode, as a client, only when connecting to known bad servers.
This is largely equivalent to
nodejs/node#31446 in terms of code changes.
Fixes: nodejs/node#31440
Refs: nodejs/node#31446
Backport-PR-URL: nodejs/node#31500
PR-URL: nodejs/node#31448
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
zsw007 added a commit to ibmruntimes/node that referenced this pull request Feb 12, 2020
Backport 7fc5656
Original commit message:
From the issue:
> Some servers deviate from HTTP spec enougth that Node.js can't
> communicate with them, but "work" when `--insecure-http-parser`
> is enabled globally. It would be useful to be able to use this
> mode, as a client, only when connecting to known bad servers.
This is largely equivalent to
nodejs/node#31446 in terms of code changes.
Fixes: nodejs/node#31440
Refs: nodejs/node#31446
Backport-PR-URL: nodejs/node#31500
PR-URL: nodejs/node#31448
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
zsw007 added a commit to ibmruntimes/node that referenced this pull request Feb 12, 2020
Backport 7fc5656
Original commit message:
From the issue:
> Some servers deviate from HTTP spec enougth that Node.js can't
> communicate with them, but "work" when `--insecure-http-parser`
> is enabled globally. It would be useful to be able to use this
> mode, as a client, only when connecting to known bad servers.
This is largely equivalent to
nodejs/node#31446 in terms of code changes.
Fixes: nodejs/node#31440
Refs: nodejs/node#31446
Backport-PR-URL: nodejs/node#31500
PR-URL: nodejs/node#31448
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.httpIssues or PRs related to the http subsystem.semver-minorPRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow insecure-http-header parsing to be requested per server

6 participants

@addaleax@nodejs-github-bot@sam-github@jasnell@Trott@cjihrig