diff --git a/lib/_http_client.js b/lib/_http_client.js index 7707fa74cf7..3c6950794ac 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -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); diff --git a/lib/_http_server.js b/lib/_http_server.js index 03fbd47f974..9143fa1fc46 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -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