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

@indutny

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

@indutny mentioned this pull request

Apr 16, 2016

4 tasks

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>