aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornoffle <sww@eight45.net>2018-04-19 15:30:45 -0700
committernoffle <sww@eight45.net>2018-04-19 15:30:45 -0700
commit9cdce1f0fa8e7969eb1ab545e716b4630ae1ec68 (patch)
treefa90dfef063366c07e38c14a278abf2e19eafd15 /lib
parentd64cd4d8402357862c983a26b788e40dd32d21a9 (diff)
downloadpatchfoo-9cdce1f0fa8e7969eb1ab545e716b4630ae1ec68.tar.gz
patchfoo-9cdce1f0fa8e7969eb1ab545e716b4630ae1ec68.zip
fix: web mime type and length
Diffstat (limited to 'lib')
-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})
)
})
}