diff options
Diffstat (limited to 'lib/_http_common.js')
-rw-r--r-- | lib/_http_common.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/_http_common.js b/lib/_http_common.js index addf9a0fa4..5140d36666 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -140,6 +140,7 @@ var parsers = new FreeList('parsers', 1000, function() { parser._headers = []; parser._url = ''; + parser._consumed = false; // Only called in the slow case where slow means // that the request headers were either fragmented @@ -167,6 +168,9 @@ function freeParser(parser, req, socket) { if (parser) { parser._headers = []; parser.onIncoming = null; + if (parser._consumed) + parser.unconsume(); + parser._consumed = false; if (parser.socket) parser.socket.parser = null; parser.socket = null; |