Skip to content

http: skip body and next message of CONNECT res - #6279

Closed
indutny wants to merge 3 commits into
nodejs:masterfrom
indutny:fix/gh-6198
Closed

http: skip body and next message of CONNECT res#6279
indutny wants to merge 3 commits into
nodejs:masterfrom
indutny:fix/gh-6198

Conversation

@indutny

Copy link
Copy Markdown
Member
Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • the commit message follows commit guidelines
Affected core subsystem(s)

http

Description of change
http: skip body and next message of CONNECT res
When handling a response to `CONNECT` request - skip message body
and do not attempt to parse the next message. `CONNECT` requests are
used in similar sense to HTTP Upgrade.
Fix: https://github.com/nodejs/node/pull/6198

cc @nodejs/http @mscdex@bnoordhuis

indutnyand others added 3 commits April 19, 2016 10:47
Adds `2` as a return value of `on_headers_complete`, this mode will be
used to fix handling responses to `CONNECT` requests.
See: nodejs#6198
When handling a response to `CONNECT` request - skip message body
and do not attempt to parse the next message. `CONNECT` requests are
used in similar sense to HTTP Upgrade.
Fix: nodejs#6198
@indutnyindutny added http Issues or PRs related to the http subsystem. lts-watch-v4.x labels Apr 19, 2016
@indutny

Copy link
Copy Markdown
MemberAuthor

cc @nodejs/lts for discussion of backporting http-parser update to v4

@indutny

Copy link
Copy Markdown
MemberAuthor

@indutnyindutny changed the title Fix/gh 6198http: skip body and next message of CONNECT resApr 19, 2016
@mscdex

Copy link
Copy Markdown
Contributor

Last CI failed because the certify box wasn't checked.

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

@indutny

Copy link
Copy Markdown
MemberAuthor

Oops, my bad.

Comment threadlib/_http_common.js
}

return skipBody;
if (typeof skipBody !== 'number')

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

If anyone is curious - this is for compatibility with external code. (like node-spdy)

@mscdex

Copy link
Copy Markdown
Contributor

CI is green. LGTM

@jasnell

Copy link
Copy Markdown
Member

LGTM

@indutny

Copy link
Copy Markdown
MemberAuthor

Landed in 7f14483, 7f14483, and 0ecc430. thank you!

indutny added a commit that referenced this pull request Apr 19, 2016
Adds `2` as a return value of `on_headers_complete`, this mode will be
used to fix handling responses to `CONNECT` requests.
See: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
indutny added a commit that referenced this pull request Apr 19, 2016
When handling a response to `CONNECT` request - skip message body
and do not attempt to parse the next message. `CONNECT` requests are
used in similar sense to HTTP Upgrade.
Fix: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
indutny pushed a commit that referenced this pull request Apr 19, 2016
See: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@jasnelljasnell closed this Apr 19, 2016
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
Adds `2` as a return value of `on_headers_complete`, this mode will be
used to fix handling responses to `CONNECT` requests.
See: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
When handling a response to `CONNECT` request - skip message body
and do not attempt to parse the next message. `CONNECT` requests are
used in similar sense to HTTP Upgrade.
Fix: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
See: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 21, 2016
Buffer:
* Buffer.prototype.compare can now compare sub-ranges of two Buffers
(James M Snell) #5880
deps:
* update to http-parser 2.7.0
(Fedor Indutny) #6279
* update ESLint to 2.7.0
(silverwind) #6132
net:
* adds support for passing DNS lookup hints to createConnection()
(Colin Ihrig) #6000
node:
* Make the builtin libraries available for the --eval and --print
CLI options
(Anna Henningsen) #6207
npm:
* upgrade npm to 3.8.6
(Kat Marchán) #6153
repl:
* Pressing enter in the repl will repeat the last command by default
if no input has been received. This behaviour was in node
previously and was not removed intentionally.
(Rich Trott) #6090
src:
* add SIGINFO to supported signals
(James Reggio) #6093
streams:
* Fix a regression that caused by net streams requesting multiple
chunks synchronously when combined with cork/uncork
(Matteo Collina) #6164
zlib:
* The flushing flag is now configurable allowing for decompression
of partial data
(Anna Henningsen) #6069
This was referenced Apr 21, 2016
MylesBorins pushed a commit that referenced this pull request Apr 21, 2016
Adds `2` as a return value of `on_headers_complete`, this mode will be
used to fix handling responses to `CONNECT` requests.
See: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 21, 2016
When handling a response to `CONNECT` request - skip message body
and do not attempt to parse the next message. `CONNECT` requests are
used in similar sense to HTTP Upgrade.
Fix: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 21, 2016
See: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Apr 21, 2016
Buffer:
* Buffer.prototype.compare can now compare sub-ranges of two Buffers
(James M Snell) #5880
deps:
* update to http-parser 2.7.0
(Fedor Indutny) #6279
* update ESLint to 2.7.0
(silverwind) #6132
net:
* adds support for passing DNS lookup hints to createConnection()
(Colin Ihrig) #6000
node:
* Make the builtin libraries available for the --eval and --print
CLI options
(Anna Henningsen) #6207
npm:
* upgrade npm to 3.8.6
(Kat Marchán) #6153
repl:
* Pressing enter in the repl will repeat the last command by default
if no input has been received. This behavior was in node
previously and was not removed intentionally.
(Rich Trott) #6090
src:
* add SIGINFO to supported signals
(James Reggio) #6093
streams:
* Fix a regression that caused by net streams requesting multiple
chunks synchronously when combined with cork/uncork
(Matteo Collina) #6164
zlib:
* The flushing flag is now configurable allowing for decompression
of partial data
(Anna Henningsen) #6069
@indutny

Copy link
Copy Markdown
MemberAuthor

@thealphanerd yep.

@indutny
indutny deleted the fix/gh-6198 branch June 1, 2016 22:49
@MylesBorins

Copy link
Copy Markdown
Contributor

@indutny it looks like this uses a different http parser under the hood and is not merging cleanly... can you take a look at manually backporting?

@indutny

Copy link
Copy Markdown
MemberAuthor

@thealphanerd sorry for delay.

@indutny

Copy link
Copy Markdown
MemberAuthor

@thealphanerd Looking at this now.

@indutnyindutny mentioned this pull request Jun 8, 2016
@indutny

Copy link
Copy Markdown
MemberAuthor

@thealphanerd done #7213

indutny added a commit to indutny/io.js that referenced this pull request Jun 28, 2016
Adds `2` as a return value of `on_headers_complete`, this mode will be
used to fix handling responses to `CONNECT` requests.
See: nodejs#6198
PR-URL: nodejs#6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
indutny added a commit to indutny/io.js that referenced this pull request Jun 28, 2016
When handling a response to `CONNECT` request - skip message body
and do not attempt to parse the next message. `CONNECT` requests are
used in similar sense to HTTP Upgrade.
Fix: nodejs#6198
PR-URL: nodejs#6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
indutny pushed a commit to indutny/io.js that referenced this pull request Jun 28, 2016
See: nodejs#6198
PR-URL: nodejs#6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit to MylesBorins/node that referenced this pull request Jul 5, 2016
Adds `2` as a return value of `on_headers_complete`, this mode will be
used to fix handling responses to `CONNECT` requests.
See: nodejs#6198
PR-URL: nodejs#6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit to MylesBorins/node that referenced this pull request Jul 5, 2016
When handling a response to `CONNECT` request - skip message body
and do not attempt to parse the next message. `CONNECT` requests are
used in similar sense to HTTP Upgrade.
Fix: nodejs#6198
PR-URL: nodejs#6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit to MylesBorins/node that referenced this pull request Jul 5, 2016
See: nodejs#6198
PR-URL: nodejs#6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2016
Adds `2` as a return value of `on_headers_complete`, this mode will be
used to fix handling responses to `CONNECT` requests.
See: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2016
When handling a response to `CONNECT` request - skip message body
and do not attempt to parse the next message. `CONNECT` requests are
used in similar sense to HTTP Upgrade.
Fix: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2016
See: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
Adds `2` as a return value of `on_headers_complete`, this mode will be
used to fix handling responses to `CONNECT` requests.
See: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
When handling a response to `CONNECT` request - skip message body
and do not attempt to parse the next message. `CONNECT` requests are
used in similar sense to HTTP Upgrade.
Fix: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jul 12, 2016
See: #6198
PR-URL: #6279
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Jul 12, 2016
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

httpIssues or PRs related to the http subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@indutny@mscdex@jasnell@MylesBorins@slushie