Expand a buffer into the response body.
If the content length can be determine reliably (eg. no 'Content-Encoding' applied), it will be set as well.
This function accept empty buffers, which result in an explicit 'Content-Length: 0' header and an empty payload.