http: v0.10 server doesn't close connection #7011
Comments
var http = require('http');
http.createServer(function(req, res) {
this.close();
res.end();
}).listen(8000, '127.0.0.1', function() {
http.get({ port: 8000, agent: false }, function(res) {
// do nothing
});
}); Works fine on both master and v0.10. It seems that agent just hast a bit different behavior between them. Seems like a behavior change and not a bug. |
Of course, but where is that change in behavior documented? The http documentation doesn't mention it. Actually, it mentions quite the opposite: it states in a few places that the agent defaults to keep-alive while the actual behavior seems to be |
Ok, reopening. But it will most likely not be a priority issue for me, so if you or anyone else wish - a PR, fixing the documentation would be highly welcome! |
@bnoordhuis ... is this still an issue for you? |
No, and it never was. :-) But I believe the documentation is still wrong in a couple of places. |
… between v0.10 (Connection: keepAlive) and master (Connection: close). This commit is a fix for nodejs#7011
... or master does, depending on how you look at it. Either way, the behavior between master and v0.10 is different.
With v0.10:
With master:
The text was updated successfully, but these errors were encountered: