mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
Attempt to calculate PATH_INFO if it is not present.
This commit is contained in:
parent
7ca6bf56b9
commit
f75d51284b
@ -143,7 +143,21 @@ class CalDAVRequest
|
|||||||
* 4. otherwise we query the defined relationships between users and use
|
* 4. otherwise we query the defined relationships between users and use
|
||||||
* the minimum privileges returned from that analysis.
|
* the minimum privileges returned from that analysis.
|
||||||
*/
|
*/
|
||||||
$this->path = (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : "/");
|
if ( isset($_SERVER['PATH_INFO']) ) {
|
||||||
|
$this->path = $_SERVER['PATH_INFO'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$this->path = "/";
|
||||||
|
if ( isset($_SERVER['REQUEST_URI']) ) {
|
||||||
|
$path = preg_replace( '{^(.*?\.php/?)}', '/', $_SERVER['REQUEST_URI'], $matches );
|
||||||
|
if ( !empty($matches[1]) ) {
|
||||||
|
$this->path = $path;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
dbg_error_log('LOG', 'Server is not supplying PATH_INFO and REQUEST_URI does not include a PHP program. Wildly guessing "/"!!!');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
$this->path = rawurldecode($this->path);
|
$this->path = rawurldecode($this->path);
|
||||||
|
|
||||||
/** Allow a request for .../calendar.ics to translate into the calendar URL */
|
/** Allow a request for .../calendar.ics to translate into the calendar URL */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user