Skip to content

Commit

Permalink
http: describe parse err in debug output
Browse files Browse the repository at this point in the history
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 jasnell committed Jun 5, 2017
1 parent 8620aad commit b3c9bff
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 @@ -451,7 +451,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 @@ -462,7 +462,7 @@ function socketOnError(e) {

function onParserExecuteCommon(server, socket, parser, state, 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 b3c9bff

Please sign in to comment.