diff options
Diffstat (limited to 'test/simple/test-http-curl-chunk-problem.js')
-rw-r--r-- | test/simple/test-http-curl-chunk-problem.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/simple/test-http-curl-chunk-problem.js b/test/simple/test-http-curl-chunk-problem.js index 701624633..8f6824430 100644 --- a/test/simple/test-http-curl-chunk-problem.js +++ b/test/simple/test-http-curl-chunk-problem.js @@ -69,13 +69,16 @@ var server = http.createServer(function(req, res) { res.write(data); }); + cat.stdout.on('end', function onStdoutEnd() { + res.end(); + }); + // End the response on exit (and log errors) cat.on('exit', function(code) { if (code !== 0) { console.error('subprocess exited with code ' + code); process.exit(1); } - res.end(); }); }); |