From 72c25cf79944ed8a1255266117d577787499de22 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 08:53:32 +0200 Subject: [PATCH] Pass through any GET parameters on the .well-known/timezone URL. --- htdocs/well-known.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/well-known.php b/htdocs/well-known.php index 588de822..2b71addf 100644 --- a/htdocs/well-known.php +++ b/htdocs/well-known.php @@ -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. }