Pass through any GET parameters on the .well-known/timezone URL.

This commit is contained in:
Andrew McMillan 2011-10-05 08:53:32 +02:00
parent f01e6f5eb5
commit 72c25cf799

View File

@ -21,7 +21,12 @@ switch ( $request->path ) {
$request->DoResponse(301); // Moved permanently
// does not return.
case '/.well-known/timezone':
header('Location: ' . str_replace('/caldav.php', '', ConstructURL('/tz.php',true)) );
$parameters = '';
foreach( $_GET as $k => $v ) {
$parameters .= ($parameters == '' ? '?' : '&' );
$parameters .= $k.'='.rawurlencode($v);
}
header('Location: ' . str_replace('/caldav.php', '', ConstructURL('/tz.php',true)).$parameters );
$request->DoResponse(301); // Moved permanently
// does not return.
}