Skip to content

Commit

Permalink
Update webroot files to fix an issue in ServerShell.
Browse files Browse the repository at this point in the history
The previous fixes done in 2918ae9
caused other issues preventing actions from being dispatched properly.

Fixes #3934
  • Loading branch information
markstory committed Jul 27, 2013
1 parent b345a8f commit c28cde4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/webroot/index.php
Expand Up @@ -79,8 +79,7 @@

// for built-in server
if (php_sapi_name() == 'cli-server') {
$uri = str_replace($_SERVER['SCRIPT_FILENAME'], WWW_ROOT, '');
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $uri)) {
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
return false;
}
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
Expand Down
3 changes: 1 addition & 2 deletions lib/Cake/Console/Templates/skel/webroot/index.php
Expand Up @@ -79,8 +79,7 @@

// for built-in server
if (php_sapi_name() === 'cli-server') {
$uri = str_replace($_SERVER['SCRIPT_FILENAME'], WWW_ROOT, '');
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $uri)) {
if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) {
return false;
}
$_SERVER['PHP_SELF'] = '/' . basename(__FILE__);
Expand Down

0 comments on commit c28cde4

Please sign in to comment.