aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/serve.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/serve.js b/lib/serve.js
index f7c2491..aad7159 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1571,6 +1571,10 @@ Serve.prototype.blob = function (id, path) {
self.res.setHeader('Content-Length', size)
if (self.query.name) self.res.setHeader('Content-Disposition',
'inline; filename='+encodeDispositionFilename(self.query.name))
+ if (self.query.gzip)
+ res.setHeader('Content-Encoding', 'gzip')
+ if (self.query.contentType)
+ res.setHeader('Content-Type', self.query.contentType)
self.res.setHeader('Cache-Control', 'public, max-age=315360000')
self.res.setHeader('etag', etag)
self.res.writeHead(200)
@@ -1653,6 +1657,10 @@ Serve.prototype.image = function (path) {
self.res.setHeader('Content-Length', data.length)
if (self.query.name) self.res.setHeader('Content-Disposition',
'inline; filename='+encodeDispositionFilename(self.query.name))
+ if (self.query.gzip)
+ res.setHeader('Content-Encoding', 'gzip')
+ if (self.query.contentType)
+ res.setHeader('Content-Type', self.query.contentType)
self.res.setHeader('Cache-Control', 'public, max-age=315360000')
self.res.setHeader('ETag', etag)
self.res.writeHead(200)