mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-31 03:34:18 +00:00
Add protocol://hostname onto location header per spec.
This commit is contained in:
parent
04482d5033
commit
6500f73133
@ -17,7 +17,7 @@ if ( ! isset ( $request ) ) {
|
||||
switch ( $request->path ) {
|
||||
case '/.well-known/caldav':
|
||||
case '/.well-known/carddav':
|
||||
header('Location: ' . ConstructURL('/',true) );
|
||||
header('Location: ' . $c->protocol_server_port . ConstructURL('/',true) );
|
||||
$request->DoResponse(301); // Moved permanently
|
||||
// does not return.
|
||||
case '/.well-known/timezone':
|
||||
@ -26,7 +26,7 @@ switch ( $request->path ) {
|
||||
$parameters .= ($parameters == '' ? '?' : '&' );
|
||||
$parameters .= $k.'='.rawurlencode($v);
|
||||
}
|
||||
header('Location: ' . str_replace('/caldav.php', '', ConstructURL('/tz.php',true)).$parameters );
|
||||
header('Location: ' . $c->protocol_server_port . str_replace('/caldav.php', '', ConstructURL('/tz.php',true)).$parameters );
|
||||
$request->DoResponse(301); // Moved permanently
|
||||
// does not return.
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user