diff --git a/handlers.js b/handlers.js index cfa4785..2e88538 100644 --- a/handlers.js +++ b/handlers.js @@ -45,7 +45,7 @@ module.exports.create = function (state) { // Probably something that needs to be redirected to https function redirectHttpsAndClose(req, res) { - res.setHeader('Connection', 'close'); + //res.setHeader('Connection', 'close'); redirectHttps(req, res); } state.httpInsecureServer = http.createServer( diff --git a/lib/unwrap-tls.js b/lib/unwrap-tls.js index 11a1b3a..02312eb 100644 --- a/lib/unwrap-tls.js +++ b/lib/unwrap-tls.js @@ -72,6 +72,7 @@ module.exports.createTcpConnectionHandler = function (copts) { // defer after return (instead of being in many places) process.nextTick(function () { conn.unshift(firstChunk); + conn.resume(); }); var service = 'tcp';