Commit 24c7a94 1 parent ab20214 commit 24c7a94 Copy full SHA for 24c7a94
File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2427,8 +2427,9 @@ it will switch to implicit header mode and flush the implicit headers.
2427
2427
This sends a chunk of the response body. This method may
2428
2428
be called multiple times to provide successive parts of the body.
2429
2429
2430
- Writing to the body is not allowed when the request method or response status
2431
- do not support content. If an attempt is made to write to the body for a
2430
+ If ` rejectNonStandardBodyWrites ` is set to true in ` createServer `
2431
+ then writing to the body is not allowed when the request method or response
2432
+ status do not support content. If an attempt is made to write to the body for a
2432
2433
HEAD request or as part of a ` 204 ` or ` 304 ` response, a synchronous ` Error `
2433
2434
with the code ` ERR_HTTP_BODY_NOT_ALLOWED ` is thrown.
2434
2435
@@ -3571,6 +3572,9 @@ changes:
3571
3572
* ` uniqueHeaders` {Array} A list of response headers that should be sent only
3572
3573
once. If the header's value is an array, the items will be joined
3573
3574
using ` ; ` .
3575
+ * ` rejectNonStandardBodyWrites` {boolean} If set to ` true ` , an error is thrown
3576
+ when writing to an HTTP response which does not have a body.
3577
+ **Default:** ` false ` .
3574
3578
3575
3579
* ` requestListener` {Function}
3576
3580
You can’t perform that action at this time.
0 commit comments