// HTTP Headers longer than MSS server and client test var result = 0; var http = require("http"); var server = http.createServer(function (req, res) { console.log("Connected"); var body = ''; req.on('data', function(data) { console.log("<" + data); body += data; }); req.on('end', function() { console.log("RES ", res.headers); var body = ''; res.on('data', function(data) { console.log(">" + data); body += data; }); res.on('end', function() { console.log(">END"); server.close(); result = body=="42-0123456789abcdef-24"; }); res.on('close', function() { console.log(">CLOSE"); }); }) req.on('error', function(e) { console.log(">ERROR: " + e.message); }); req.end('-0123456789abcdef-'); // longer than 15 chars