summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMalf Furious <m@lfurio.us>2017-06-04 18:03:16 -0400
committerMalf Furious <m@lfurio.us>2017-06-04 18:03:16 -0400
commitd52b67bbc212f85cc6e80e107029bda4d4445b94 (patch)
tree1b159963380fdef150a1ca4ba3f987b305abe77c
parentd677fe73839b22fe2065be5a7f6c49a1b11e8c18 (diff)
downloadscrott-d52b67bbc212f85cc6e80e107029bda4d4445b94.tar.gz
scrott-d52b67bbc212f85cc6e80e107029bda4d4445b94.zip
Fix bug in function serveResource()
It is necessary to use double-quotes in the Content-Disposition header.
-rw-r--r--app/df.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/df.php b/app/df.php
index 92dd9dd..3f648ad 100644
--- a/app/df.php
+++ b/app/df.php
@@ -43,7 +43,7 @@ function serveResource(string $uri, ?string $filename = NULL) : void
header("Content-Length: " . filesize($uri));
if ($filename)
- header("Content-Disposition: attachment; filename='" . $filename . "'");
+ header("Content-Disposition: attachment; filename=\"" . $filename . "\"");
fpassthru($f);
fclose($f);