@@ -829,6 +829,10 @@ changes:
829
829
description: The `rawPacket` is the current buffer that just parsed. Adding
830
830
this buffer to the error object of `'clientError'` event is to
831
831
make it possible that developers can log the broken packet.
832
+ - version: REPLACEME
833
+ pr-url: https://github.com/nodejs/node/pull/25605
834
+ description: The default behavior will return a 431 Request Header
835
+ Fields Too Large if a HPE_HEADER_OVERFLOW error occurs.
832
836
-->
833
837
834
838
* ` exception ` {Error}
@@ -839,8 +843,10 @@ Listener of this event is responsible for closing/destroying the underlying
839
843
socket. For example, one may wish to more gracefully close the socket with a
840
844
custom HTTP response instead of abruptly severing the connection.
841
845
842
- Default behavior is to close the socket with an HTTP '400 Bad Request' response
843
- if possible, otherwise the socket is immediately destroyed.
846
+ Default behavior is to try close the socket with a HTTP '400 Bad Request',
847
+ or a HTTP '431 Request Header Fields Too Large' in the case of a
848
+ [ ` HPE_HEADER_OVERFLOW ` ] [ ] error. If the socket is not writable it is
849
+ immediately destroyed.
844
850
845
851
` socket ` is the [ ` net.Socket ` ] [ ] object that the error originated from.
846
852
@@ -2171,3 +2177,4 @@ not abort the request or do anything besides add a `'timeout'` event.
2171
2177
[ `url.parse()` ] : url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost
2172
2178
[ Readable Stream ] : stream.html#stream_class_stream_readable
2173
2179
[ Stream ] : stream.html#stream_stream
2180
+ [ `HPE_HEADER_OVERFLOW` ] : errors.html#errors_hpe_header_overflow
0 commit comments