response.strictContentLength
- 类型: <boolean> 默认:
false
如果设置为 true,Node.js 将检查 Content-Length 头的值与正文的字节大小是否相等。Content-Length 头值不匹配将导致抛出一个 Error,其标识为 code: 'ERR_HTTP_CONTENT_LENGTH_MISMATCH'。
【If set to true, Node.js will check whether the Content-Length
header value and the size of the body, in bytes, are equal.
Mismatching the Content-Length header value will result
in an Error being thrown, identified by code: 'ERR_HTTP_CONTENT_LENGTH_MISMATCH'.】