Commit 32b641e5 authored by iskore's avatar iskore Committed by Ruben Bridgewater
Browse files

http: fixed socket.setEncoding fatal error

Applied updates from previous pull-requests to disallow
socket.setEncoding before a http connection is parsed.
Wrapped `socket.setEncoding` to throw an error.
This previously resulted in a fatal error.

PR-URL: https://github.com/nodejs/node/pull/33405
Fixes: https://github.com/nodejs/node/issues/18118
Refs: https://github.com/nodejs/node/pull/18178
Refs: https://github.com/nodejs/node/pull/19344


Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
parent 10596b60
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment