aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/serve.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/serve.js b/lib/serve.js
index ca6b2ae..d0e2e26 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -47,7 +47,8 @@ function ctype(name) {
}
function encodeDispositionFilename(fname) {
- return '"' + fname.replace(/\/g/, '\\\\').replace(/"/, '\\\"') + '"'
+ fname = fname.replace(/\/g/, '\\\\').replace(/"/, '\\\"')
+ return '"' + encodeURIComponent(fname) + '"'
}
function Serve(app, req, res) {