Closed
Description
I propose we make http set the Content-Length
header when the user does only call OutgoingMessage.prototype.end
and not write
or writeHead
.
Eg.
require('http').createServer(function (req, res) {
res.end('Hello World')
}).listen(1337)
HTTP/1.1 200 OK
Date: Tue, 03 Mar 2015 19:42:18 GMT
Connection: keep-alive
Content-Length: 11
Hello World
It is a trivial change in lib/
, but breaks a lot of tests.