This repository was archived by the owner on Mar 19, 2019. It is now read-only.
This repository was archived by the owner on Mar 19, 2019. It is now read-only.
Automatically chunk HTTP/1.1 Connection: close responses #259
Closed
Description
Chunked responses seem more reliable than relying on the TCP connection to close in order to end the response. Kestrel is changing it's behavior in 1.1 to automatically chunk HTTP/1.1 responses, even if they have the Connection: close
header is set.
More context can be found here: aspnet/KestrelHttpServer#962 (comment)
Also FWIW, node.js follows the behavior I'm recommending. The following app will chunk given HTTP/1.1 request, but not for HTTP/1.0 requests of course.
var http = require('http');
var server = http.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/plain", "Connection": "close"});
response.end("Hello World!");
});
server.listen(8000);
console.log("Server running at http://127.0.0.1:8000/");