Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Nagy <ronagy@icloud.com>2020-07-21 21:53:07 +0300
committerRobert Nagy <ronagy@icloud.com>2020-07-25 10:59:41 +0300
commite8d7fedf7cad6e612e4f2e0456e359af57608ac7 (patch)
treef9c70e89d9c4ac0c2810b076b93bc9ce7f876d6b /doc/api/http.md
parentde192246bc29c43f387bc18024515cc475be152d (diff)
http: don't write error to socket
The state of the connection is unknown at this point and writing to it can corrupt client state before it is aware of an error. PR-URL: https://github.com/nodejs/node/pull/34465 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/http.md')
-rw-r--r--doc/api/http.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/api/http.md b/doc/api/http.md
index f9091859054..98bb57b69dd 100644
--- a/doc/api/http.md
+++ b/doc/api/http.md
@@ -1074,8 +1074,8 @@ type other than {net.Socket}.
Default behavior is to try close the socket with a HTTP '400 Bad Request',
or a HTTP '431 Request Header Fields Too Large' in the case of a
-[`HPE_HEADER_OVERFLOW`][] error. If the socket is not writable it is
-immediately destroyed.
+[`HPE_HEADER_OVERFLOW`][] error. If the socket is not writable or has already
+written data it is immediately destroyed.
`socket` is the [`net.Socket`][] object that the error originated from.