response.strictContentLength


如果设置为 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'.