diff --git a/lib/_http_common.js b/lib/_http_common.js index e97670f0acaf11..361776f249810e 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -45,6 +45,7 @@ let debug = require('internal/util/debuglog').debuglog('http', (fn) => { const kIncomingMessage = Symbol('IncomingMessage'); const kRequestTimeout = Symbol('RequestTimeout'); +const kOnMessageBegin = HTTPParser.kOnMessageBegin | 0; const kOnHeaders = HTTPParser.kOnHeaders | 0; const kOnHeadersComplete = HTTPParser.kOnHeadersComplete | 0; const kOnBody = HTTPParser.kOnBody | 0; @@ -238,6 +239,7 @@ function cleanParser(parser) { parser.incoming = null; parser.outgoing = null; parser.maxHeaderPairs = MAX_HEADER_PAIRS; + parser[kOnMessageBegin] = null; parser[kOnExecute] = null; parser[kOnTimeout] = null; parser._consumed = false;