Internet Explorer causes a hard server crash when using SSL on Node.js
I have SSL set up on Node.js (and Express.js) and it seems to be working fine on every browser other than Internet Explorer 9. Occasionally (Not always), Internet Explorer causes the server to crash with this message:
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: EPIPE, Broken pipe
at Socket._writeImpl (net.js:159:14)
at Socket._writeOut (net.js:450:25)
at Socket.write (net.js:377:17)
at EncryptedStream.ondata (stream.js:36:26)
at EncryptedStream.emit (events.js:64:17)
at EncryptedStream._push (tls.js:299:12)
at SecurePair.cycle (tls.js:581:20)
at CleartextStream.write (tls.js:96:13)
at ServerResponse._writeRaw (http.js:391:28)
at ServerResponse._send (http.js:371:15)
When I disable SSL I haven't come across this, so I assume it's down to this.
Initialisation code is:
var app = express.createServer({
key: fs.readFileSync('KeyFile.key').toString(),
cert: fs.readFileSync('KeyFile.pem').toString()
});
...
app = app.listen(443);
I've tried changing various things in my code, from the view rendering, to the headers sen开发者_如何学JAVAt, to the sessions, and I've run out of ideas.
Thanks, Nathan
This issue was filed as #1481 in Node's issue tracker, but seems to have disappeared. Searching for "1481" on github reveals at least part of the thread of discussion about it...
But on to the good news: I was also experiencing this problem when using v0.4.8 on OSX/Snow Leopard, but (fingers crossed) upgrading to 0.4.12 seems to have made the problem "go away". Not the most reassuring thing, but hopefully it lets you get on with your project...
精彩评论