You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
http: double error emitted after HPE_INVALID_CONSTANT #40242
Error: Parse Error: Expected HTTP/
at HTTPParser.execute (<anonymous>)
at TLSSocket.socketOnData (_http_client.js:509:22)
at TLSSocket.emit (events.js:315:20)
at TLSSocket.Readable.read (internal/streams/readable.js:519:10)
at TLSSocket.Socket.read (net.js:625:39)
at flow (internal/streams/readable.js:992:34)
at resume_ (internal/streams/readable.js:973:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
bytesParsed: 5381,
code: 'HPE_INVALID_CONSTANT',
reason: 'Expected HTTP/',
rawPacket: <Buffer 76 5e f0 68 d0 0c 11 d7 50 8f 67 2e 18 c8 b3 a6 ac c8 75 70 2b e3 65 26 5d e9 b5 1f 6e 62 2b 88 87 15 0e 2f 14 4b 7d 90 33 6a 5a 18 06 bf 74 86 cf 6c ... 16334 more bytes>
}
internal/assert.js:14
throw new ERR_INTERNAL_ASSERTION(message);
^
Error [ERR_INTERNAL_ASSERTION]: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues
at assert (internal/assert.js:14:11)
at TLSSocket.socketOnData (_http_client.js:507:3)
at TLSSocket.emit (events.js:315:20)
at TLSSocket.Readable.read (internal/streams/readable.js:519:10)
at TLSSocket.Socket.read (net.js:625:39)
at flow (internal/streams/readable.js:992:34)
at resume_ (internal/streams/readable.js:973:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
code: 'ERR_INTERNAL_ASSERTION'
}
I think this is one of those we've been struggling with at undici as well. The server might be sending more data than is advertised in the content-length header. I don't know of any good solution to this problem.
Activity
mcollina commentedon Sep 28, 2021
WDYT @ronag?
ronag commentedon Sep 28, 2021
I think this is one of those we've been struggling with at undici as well. The server might be sending more data than is advertised in the content-length header. I don't know of any good solution to this problem.
mcollina commentedon Sep 28, 2021
I'm referring on the fact that we are not removing the listener for
'data'in https://github.com/nodejs/node/blob/master/lib/_http_client.js#L488-L494.ronag commentedon Sep 28, 2021
We should probably remove the listener or add a
socket.destroyedcheck.http: remove 'data' and 'end' listener if client parser error
http: remove 'data' and 'end' listener if client parser error
http: remove 'data' and 'end' listener if client parser error