Skip to content

Commit

Permalink
Fix serving existing files with encoded characters like %20
Browse files Browse the repository at this point in the history
  • Loading branch information
travismiller committed Aug 22, 2017
1 parent 0a53de4 commit c80e6a5
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 c80e6a5

Please sign in to comment.