Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleaning up status code comment to be clearer.
  • Loading branch information
Miles Elam committed Feb 10, 2018
commit fba79a8a66396b20eb1ab2b70e650f2e9bb1d3f8
5 changes: 3 additions & 2 deletions lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,9 @@ function socketOnData(d) {
// When the status code is 100 (Continue), 102 (Processing),
// 103 (Early Hints), or 104-199 (Unassigned), the server will
// send a final response after this client sends a request
// body. 101 (Switching Protocols) and all other status codes
// should be handled separately. So, we must not free the parser.
// body, so we must not free the parser.
// 101 (Switching Protocols) and all other status codes
// should be processed normally.
(parser.incoming.statusCode >= 200 ||
parser.incoming.statusCode === 101)) {
socket.removeListener('data', socketOnData);
Expand Down