Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1aea1e3

Browse filesBrowse files
mcollinaMylesBorins
authored andcommitted
http: fix regression of binary upgrade response body
PR-URL: #25039 Fixes: #24958 Reviewed-By: Myles Borins <myles.borins@gmail.com>
1 parent 728bc63 commit 1aea1e3
Copy full SHA for 1aea1e3

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎src/node_http_parser.cc‎

Copy file name to clipboardExpand all lines: src/node_http_parser.cc
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,8 +605,6 @@ class Parser : public AsyncWrap, public StreamListener {
605605
size_t nparsed =
606606
http_parser_execute(&parser_, &settings, data, len);
607607

608-
enum http_errno err = HTTP_PARSER_ERRNO(&parser_);
609-
610608
Save();
611609

612610
// Unassign the 'buffer_' variable
@@ -621,7 +619,9 @@ class Parser : public AsyncWrap, public StreamListener {
621619
Local<Integer> nparsed_obj = Integer::New(env()->isolate(), nparsed);
622620
// If there was a parse error in one of the callbacks
623621
// TODO(bnoordhuis) What if there is an error on EOF?
624-
if ((!parser_.upgrade && nparsed != len) || err != HPE_OK) {
622+
if (!parser_.upgrade && nparsed != len) {
623+
enum http_errno err = HTTP_PARSER_ERRNO(&parser_);
624+
625625
Local<Value> e = Exception::Error(env()->parse_error_string());
626626
Local<Object> obj = e->ToObject(env()->isolate()->GetCurrentContext())
627627
.ToLocalChecked();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.