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 <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
  • Loading branch information
sam-github authored and MylesBorins committed Jul 31, 2017
1 parent 8b3aacc commit f66f09f
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 f66f09f

Please sign in to comment.