Skip to content

Instantly share code, notes, and snippets.

@piscisaureus
Created May 28, 2012 15:20
Show Gist options
  • Save piscisaureus/2819710 to your computer and use it in GitHub Desktop.
Save piscisaureus/2819710 to your computer and use it in GitHub Desktop.
var assert = require('assert'),
net = require('net'),
connections = 0;
var server = http.createServer(function(req, res) {
if (++conns == 2)
server.close()
setTimeout(function() {
res.writeHead(200, {
'set-cookie': 'test=' + new Array(1000).join('x')
});
res.end('Hello');
}, 0);
});
server.listen(1337);
setInterval(function(){}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment