projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fda70b8
)
Slightly throttle https large body test
author
Tim Caswell
<tim@creationix.com>
Fri, 28 Jan 2011 07:37:53 +0000
(23:37 -0800)
committer
Ryan Dahl
<ry@tinyclouds.org>
Fri, 28 Jan 2011 22:35:20 +0000
(14:35 -0800)
test/simple/test-https-large-response.js
patch
|
blob
|
history
diff --git
a/test/simple/test-https-large-response.js
b/test/simple/test-https-large-response.js
index ab80ba27b3fd381c830822defd59b6642a2f5ca1..36d78bbeb863ecd14fa46016b0eca14217076224 100644
(file)
--- a/
test/simple/test-https-large-response.js
+++ b/
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) {