Created
July 27, 2018 23:16
-
-
Save reuben/401d28ef76186709cdbc6cd05b6ed69f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/jobs.js b/src/jobs.js | |
index 6ea979e..fbbed59 100644 | |
--- a/src/jobs.js | |
+++ b/src/jobs.js | |
@@ -554,7 +554,11 @@ exports.initApp = function(app) { | |
if (groupsModule.canAccessJob(req.user, dbjob)) { | |
let jobdir = _getJobDir(dbjob) | |
res.status(200).type('tar.gz') | |
- tar.pack(jobdir).pipe(zlib.createGzip()).pipe(res) | |
+ tar.pack(jobdir, { | |
+ map: function(header) { | |
+ res.set('Content-Length', header.size) | |
+ }, | |
+ }).pipe(zlib.createGzip()).pipe(res) | |
} else { | |
res.status(403).send() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment