diff --git a/lib/_http_common.js b/lib/_http_common.js index e3e732a8a180c6..642cdea41f68b1 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -46,6 +46,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; @@ -239,6 +240,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;