diff --git a/lib/_http_client.js b/lib/_http_client.js index 9088239f52ea5a..22eadfb5584676 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -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); diff --git a/lib/_http_server.js b/lib/_http_server.js index c9397a0bc2a4e7..63d3fb10cf870b 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -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