summaryrefslogtreecommitdiff
path: root/tmp-upload
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-07-13 12:37:20 +0200
committerPeter Wu <lekensteyn@gmail.com>2013-07-13 12:37:20 +0200
commit1483335f34daeb7e488c6793e3265946096079ad (patch)
treedf256057297322ab4a1f8e502e7a2b25adea48ee /tmp-upload
parente6b042c71fa67530360532fa303fe97e01cfaa82 (diff)
downloadscripts-1483335f34daeb7e488c6793e3265946096079ad.tar.gz
tmp-upload: support URL-encoded paths
Fixes 404 on paths containing whitespace.
Diffstat (limited to 'tmp-upload')
-rwxr-xr-xtmp-upload2
1 files changed, 1 insertions, 1 deletions
diff --git a/tmp-upload b/tmp-upload
index 6aa070c..9b5d4d3 100755
--- a/tmp-upload
+++ b/tmp-upload
@@ -34,7 +34,7 @@ function get_mime_type($file) {
return false;
}
-$url = $_SERVER['REQUEST_URI'];
+$url = urldecode($_SERVER['REQUEST_URI']);
/* Simply returning false causes PHP to parse (index).php. Unwanted,
* therefore serve it here. First check whether the path is within the