| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9446278 commit b8944f6
1 file 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 | ||
@@ -3569,6 +3570,9 @@ changes: | |||
| 3569 | 3570 | * `uniqueHeaders` {Array} A list of response headers that should be sent only | |
| 3570 | 3571 | once. If the header's value is an array, the items will be joined | |
| 3571 | 3572 | using `; `. | |
| 3573 | + * `rejectNonStandardBodyWrites` {boolean} If set to `true`, an error is thrown | ||
| 3574 | + when writing to an HTTP response which does not have a body. | ||
| 3575 | + **Default:** `false`. | ||
| 3572 | 3576 | ||
| 3573 | 3577 | * `requestListener` {Function} | |
| 3574 | 3578 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments