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 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
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
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.