diff --git a/htdocs/always.php b/htdocs/always.php index fb4e6e3c..c30772d2 100644 --- a/htdocs/always.php +++ b/htdocs/always.php @@ -279,7 +279,7 @@ if ( isset($_SERVER['HTTP_X_DAVICAL_TESTCASE']) ) { else if ( isset($c->dbg['script_start']) && $c->dbg['script_start'] ) { // Only log this if more than a little debugging of some sort is turned on, somewhere @dbg_error_log( 'LOG', '==========> method =%s= =%s= =%s= =%s= =%s=', - $_SERVER['REQUEST_METHOD'], $c->protocol_server_port_script, (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '$_SERVER[PATH_INFO] undefined'), $c->base_url, $c->base_directory ); + $_SERVER['REQUEST_METHOD'], $c->protocol_server_port_script, (isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] !== '' ? $_SERVER['PATH_INFO'] : '$_SERVER[PATH_INFO] undefined'), $c->base_url, $c->base_directory ); } /** diff --git a/inc/CalDAVRequest.php b/inc/CalDAVRequest.php index 8cb49ce3..65ff35c7 100644 --- a/inc/CalDAVRequest.php +++ b/inc/CalDAVRequest.php @@ -168,7 +168,7 @@ class CalDAVRequest * 4. otherwise we query the defined relationships between users and use * the minimum privileges returned from that analysis. */ - if ( isset($_SERVER['PATH_INFO']) ) { + if ( isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] !== '') { $this->path = $_SERVER['PATH_INFO']; } else { diff --git a/inc/always.php.in b/inc/always.php.in index c66b2a37..0d8ffed0 100644 --- a/inc/always.php.in +++ b/inc/always.php.in @@ -279,7 +279,7 @@ if ( isset($_SERVER['HTTP_X_DAVICAL_TESTCASE']) ) { else if ( isset($c->dbg['script_start']) && $c->dbg['script_start'] ) { // Only log this if more than a little debugging of some sort is turned on, somewhere @dbg_error_log( 'LOG', '==========> method =%s= =%s= =%s= =%s= =%s=', - $_SERVER['REQUEST_METHOD'], $c->protocol_server_port_script, (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '$_SERVER[PATH_INFO] undefined'), $c->base_url, $c->base_directory ); + $_SERVER['REQUEST_METHOD'], $c->protocol_server_port_script, (isset($_SERVER['PATH_INFO']) && $_SERVER['PATH_INFO'] !== '' ? $_SERVER['PATH_INFO'] : '$_SERVER[PATH_INFO] undefined'), $c->base_url, $c->base_directory ); } /**