Closed
Description
'use strict';
var assert = require('assert');
var http = require('http');
var net = require('net');
var seenUpgrade = 0;
process.on('exit', function() { assert.equal(seenUpgrade, 1); });
http.createServer(assert.fail).listen(0, '127.0.0.1', function() {
this.on('upgrade', function(req, conn, head) {
seenUpgrade += 1;
conn.destroy();
this.close();
});
var options = { host: this.address().address, port: this.address().port };
net.connect(options, function() {
this.write('GET / HTTP/1.1\r\n' +
'Upgrade: Yes, please.\r\n' +
'\r\n');
});
});
Works with joyent/node@v0.11.16 but fails with iojs@5843ae8. The request callback is called and the 'upgrade' event doesn't fire. I'll bisect.
Activity