0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00

http: describe parse err in debug output

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Sam Roberts 2017-05-24 13:17:34 -07:00 committed by James M Snell
parent 7f545f083d
commit 3fba3d6409
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

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