From 6500f7313366a5a3ffb29f9e74222e0e2184c98a Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Wed, 5 Oct 2011 09:40:24 +0200 Subject: [PATCH] Add protocol://hostname onto location header per spec. --- htdocs/well-known.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/well-known.php b/htdocs/well-known.php index 2b71addf..64192d8e 100644 --- a/htdocs/well-known.php +++ b/htdocs/well-known.php @@ -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. }