expressjs.com
expressjs.com copied to clipboard
Docs: Incorrect statement about `Content-Length` in `res.send` documentation
The documentation of res.send
says:
This method performs many useful tasks for simple non-streaming responses: For example, it automatically assigns the Content-Length HTTP response header field (unless previously defined) and provides automatic HEAD and HTTP cache freshness support.
Based on the code, it looks like Content-Length
will always get set, regardless of whether it's been previously defined. We should fix the documentation to match the true behavior.