diff options
Diffstat (limited to 'lib/_http_client.js')
-rw-r--r-- | lib/_http_client.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/_http_client.js b/lib/_http_client.js index 4af23fa8c5..a1750a1a00 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -33,6 +33,7 @@ const { httpSocketSetup, parsers, HTTPParser, + prepareError, } = require('_http_common'); const { OutgoingMessage } = require('_http_outgoing'); const Agent = require('_http_agent'); @@ -451,6 +452,7 @@ function socketOnData(d) { const ret = parser.execute(d); if (ret instanceof Error) { + prepareError(ret, parser, d); debug('parse error', ret); freeParser(parser, req, socket); socket.destroy(); |