Skip to main content
ServerResponse.prototype.strictContentLength - http - Node documentation
property ServerResponse.prototype.strictContentLength

Usage in Deno

import { ServerResponse } from "node:http";

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'.

Type

boolean