Skip to content

Commit

Permalink
Decode URL so it doesn't break on spaces or other encoded chars
Browse files Browse the repository at this point in the history
  • Loading branch information
timcooper committed Oct 26, 2011
1 parent 3396e5f commit 2bc26bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adaptive-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

/* get all of the required data from the HTTP request */
$document_root = $_SERVER['DOCUMENT_ROOT'];
$requested_uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
$requested_file = basename($requested_uri);
$requested_uri = parse_url(urldecode($_SERVER['REQUEST_URI']), PHP_URL_PATH);
$requested_file = basename(urldecode($requested_uri));
$source_file = $document_root.$requested_uri;
$resolution = FALSE;

Expand Down

0 comments on commit 2bc26bf

Please sign in to comment.