Browse Source

Slightly throttle https large body test

v0.7.4-release
Tim Caswell 14 years ago
committed by Ryan Dahl
parent
commit
845df3cd2e
  1. 6
      test/simple/test-https-large-response.js

6
test/simple/test-https-large-response.js

@ -23,7 +23,7 @@ var server = https.createServer(options, function (req, res) {
console.log('got request');
res.writeHead(200, { 'content-type': 'text/plain' });
res.end(body);
})
});
var count = 0;
var gotResEnd = false;
@ -35,6 +35,10 @@ server.listen(common.PORT, function () {
res.on('data', function(d) {
process.stdout.write('.');
count += d.length;
res.pause();
process.nextTick(function () {
res.resume();
});
});
res.on('end', function(d) {

Loading…
Cancel
Save