Skip to content

Commit

Permalink
http: describe parse err in debug output
Browse files Browse the repository at this point in the history
Backport-PR-URL: #14416
PR-URL: #13206
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Brian White <[email protected]>
  • Loading branch information
sam-github authored and MylesBorins committed Jul 21, 2017
1 parent 8188a52 commit 71e542c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ function socketOnData(d) {

var ret = parser.execute(d);
if (ret instanceof Error) {
debug('parse error');
debug('parse error', ret);
freeParser(parser, req, socket);
socket.destroy();
req.emit('error', ret);
Expand Down
2 changes: 1 addition & 1 deletion lib/_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ function connectionListener(socket) {

function onParserExecuteCommon(ret, d) {
if (ret instanceof Error) {
debug('parse error');
debug('parse error', ret);
socketOnError.call(socket, ret);
} else if (parser.incoming && parser.incoming.upgrade) {
// Upgrade or CONNECT
Expand Down

0 comments on commit 71e542c

Please sign in to comment.