aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/serve.js b/lib/serve.js
index ef7825d..a68d815 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -2662,6 +2662,7 @@ Serve.prototype.web = function (url) {
if (components[0] === '') components.shift()
components[0] = decodeURIComponent(components[0])
+ var type = mime.lookup(components[components.length - 1])
webresolve(this.app.sbot, components, function (err, res) {
if (err) {
return pull(
@@ -2669,10 +2670,9 @@ Serve.prototype.web = function (url) {
self.respondSink(404)
)
}
-
return pull(
pull.once(res),
- self.respondSink(200)
+ self.respondSink(200, {'content-type': type, 'content-length': res.length})
)
})
}