FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

parser: returning 2 from on_headers_complete by indutny · Pull Request #299 · nodejs/http-parser · GitHub

This repository was archived by the owner on Nov 6, 2022. It is now read-only.
/ http-parser Public archive

parser: returning 2 from on_headers_complete - #299

Closed
indutny wants to merge 1 commit into
nodejs:masterfrom
indutny:fix/gh-node-6198
Closed

parser: returning 2 from on_headers_complete#299
indutny wants to merge 1 commit into
nodejs:masterfrom
indutny:fix/gh-node-6198

Conversation

indutny commented Apr 16, 2016

Copy link
Copy Markdown
Member

Returning 2 from on_headers_complete will tell parser that it
should not expect neither a body nor any futher responses on
this connection. This is useful for handling responses to a
CONNECT request which may not contain Upgrade or
Connection: upgrade headers.

See: nodejs/node#6198

cc @bnoordhuis @jasnell @mscdex

See also: nodejs/node#6198 (comment)

Returning `2` from on_headers_complete will tell parser that it
should not expect neither a body nor any futher responses on
this connection. This is useful for handling responses to a
CONNECT request which may not contain `Upgrade` or
`Connection: upgrade` headers.

See: nodejs/node#6198

mscdex commented Apr 16, 2016
edited
Loading

Copy link
Copy Markdown
Contributor

LGTM if tests pass. Do we have the ability to do this in CI yet?

indutny commented Apr 16, 2016

Copy link
Copy Markdown
Member Author

@mscdex thank you, this is semver minor, right?

mscdex commented Apr 16, 2016

Copy link
Copy Markdown
Contributor

Assuming the original intention was for CONNECT to be handled in this way, then I would say yes.

indutny commented Apr 16, 2016

Copy link
Copy Markdown
Member Author

Yeah, also existing code will work just as it was before.

indutny commented Apr 16, 2016

Copy link
Copy Markdown
Member Author

A question for @nodejs/lts team, do you think this could be backported to v4.x.x? It seems that responses to CONNECT requests are currently a bit broken in LTS

indutny commented Apr 16, 2016

Copy link
Copy Markdown
Member Author

The problem is that this is a semver-minor change in http-parser.

indutny commented Apr 19, 2016

Copy link
Copy Markdown
Member Author

Alright, enough time to collect feedback. Landing.

indutny added a commit that referenced this pull request Apr 19, 2016
Returning `2` from on_headers_complete will tell parser that it
should not expect neither a body nor any futher responses on
this connection. This is useful for handling responses to a
CONNECT request which may not contain `Upgrade` or
`Connection: upgrade` headers.

See: nodejs/node#6198
PR-URL: #299
Reviewed-By: Brian White <mscdex@mscdex.net>

indutny commented Apr 19, 2016

Copy link
Copy Markdown
Member Author

Landed in 04d28a7, thank you everyone!

indutny closed this Apr 19, 2016
indutny deleted the fix/gh-node-6198 branch April 19, 2016 15:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL