Skip to content

Commit

Permalink
Merge pull request #2890 from travismiller/8x-fix-runserver-files-wit…
Browse files Browse the repository at this point in the history
…h-encoded-characters

8.x Fix serving existing files with encoded characters like `%20`
  • Loading branch information
grugnog authored Aug 28, 2017
2 parents 0a53de4 + c80e6a5 commit fbeb981
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion commands/runserver/d7-rs-router.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function runserver_env($key) {
}

$url = parse_url($_SERVER["REQUEST_URI"]);
if (file_exists('.' . $url['path'])) {
if (file_exists('.' . urldecode($url['path']))) {
// Serve the requested resource as-is.
return FALSE;
}
Expand Down
2 changes: 1 addition & 1 deletion commands/runserver/d8-rs-router.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function runserver_env($key) {
}

$url = parse_url($_SERVER["REQUEST_URI"]);
if (file_exists('.' . $url['path'])) {
if (file_exists('.' . urldecode($url['path']))) {
// Serve the requested resource as-is.
return FALSE;
}
Expand Down

0 comments on commit fbeb981

Please sign in to comment.