From 1483335f34daeb7e488c6793e3265946096079ad Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sat, 13 Jul 2013 12:37:20 +0200 Subject: tmp-upload: support URL-encoded paths Fixes 404 on paths containing whitespace. --- tmp-upload | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1