diff options
author | iskore <nicksoggin@gmail.com> | 2020-05-14 20:29:16 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2020-05-23 22:29:49 +0300 |
commit | 32b641e528210560d9cb4b524acf844f74d0d266 (patch) | |
tree | 094587299748a48bfce62f860f98c689cef61165 /doc/api/errors.md | |
parent | 10596b601e503512457131b3a09edadbb680d3ec (diff) |
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: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'doc/api/errors.md')
-rw-r--r-- | doc/api/errors.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/api/errors.md b/doc/api/errors.md index 1cf926c84be..62b5b0e4c3c 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -943,6 +943,11 @@ An invalid HTTP header value was specified. Status code was outside the regular status code range (100-999). +<a id="ERR_HTTP_SOCKET_ENCODING"></a> +### `ERR_HTTP_SOCKET_ENCODING` + +Changing the socket encoding is not allowed per [RFC 7230 Section 3][]. + <a id="ERR_HTTP_TRAILER_INVALID"></a> ### `ERR_HTTP_TRAILER_INVALID` @@ -2613,6 +2618,7 @@ such as `process.stdout.on('data')`. [exports]: esm.html#esm_package_entry_points [file descriptors]: https://en.wikipedia.org/wiki/File_descriptor [policy]: policy.html +[RFC 7230 Section 3]: https://tools.ietf.org/html/rfc7230#section-3 [stream-based]: stream.html [syscall]: http://man7.org/linux/man-pages/man2/syscalls.2.html [Subresource Integrity specification]: https://www.w3.org/TR/SRI/#the-integrity-attribute |