Skip to content

Commit

Permalink
Merge pull request #6 from FLYBYME/master
Browse files Browse the repository at this point in the history
use stream.pipe for tar creation
  • Loading branch information
davidbanham committed Feb 17, 2013
2 parents e44fd26 + 002e66c commit 721b5a8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app.js
Expand Up @@ -487,9 +487,7 @@ app.get('/tar', requiresLevel(0), function(req,res) {
res.setHeader('Content-Disposition', 'attachment; filename='+fileName);

// Keep writing stdout to res
tar.stdout.on('data', function (data) {
res.write(data);
});
tar.stdout.pipe(res,{ end: false });

tar.stderr.on('data', function (data) {
// Uncomment to see the files being added
Expand Down

0 comments on commit 721b5a8

Please sign in to comment.