Closed zdm closed 2 years ago
Should I use endWithoutBody()?
endWithoutBody is not a function, not exposed to the nodejs level.
It needs to be wrapped then
will you add this?
endWithoutBody is in binaries branch (no release yet)
thank you, could you release it pls?
20.10.0
endWithoutBody( reportedContentLength, closeConnection )
It works only when called without arguments. If I call it like: `endWithoutBody( 0, true ) - it does not finish response headers with "\r\n\r\n" so all communication become frozen. It works only when called without arguments.
only endWithoutBody() is implemented. It's an issue in C++ repo
Head method should return headers only without body.
So I write headers, including body Content-Length, then finish request with res.end();
res.ens() adds Content-Length: 0 automatically, if body is not provided. This leads to the error, because response will contain two Content-Length headers with different values.
Correct behavior: if res.end() called without body - do not add Content-Length header.