From e589d2ed5c8c9f101f969e58cde0c965748966c7 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sun, 25 Nov 2007 13:43:25 +1300 Subject: [PATCH] Remove protocol://host:port from principal report and be consistent with calendar-home-set response in other places also. --- inc/caldav-REPORT-principal.php | 6 ++-- .../860-Spec-REPORT-principal.result | 6 ++-- .../861-Spec-REPORT-principal.result | 30 +++++++++---------- .../862-Spec-REPORT-principal.result | 8 ++--- .../863-Spec-REPORT-principal.result | 8 ++--- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/inc/caldav-REPORT-principal.php b/inc/caldav-REPORT-principal.php index 4cbf9d6f..9ebc2067 100644 --- a/inc/caldav-REPORT-principal.php +++ b/inc/caldav-REPORT-principal.php @@ -15,9 +15,9 @@ function principal_to_xml( $properties, $item ) { dbg_error_log("REPORT","Building XML Response for principal '%s'", $item->username ); - $this_url = $c->protocol_server_port_script . $request->dav_name; - $principal_url = sprintf( "%s/%s/", $c->protocol_server_port_script, $item->username); - $home_calendar = sprintf( "%s/%s/%s/", $c->protocol_server_port_script, $item->username, $c->home_calendar_name); + $this_url = ConstructURL( $request->dav_name ); + $principal_url = ConstructURL( "/".$item->username."/"); + $home_calendar = ConstructURL( "/".$item->username."/"); $prop = new XMLElement("prop"); $denied = array(); foreach( $properties AS $k => $v ) { diff --git a/testing/tests/regression-suite/860-Spec-REPORT-principal.result b/testing/tests/regression-suite/860-Spec-REPORT-principal.result index adb16f6d..b7fe7f32 100644 --- a/testing/tests/regression-suite/860-Spec-REPORT-principal.result +++ b/testing/tests/regression-suite/860-Spec-REPORT-principal.result @@ -1,8 +1,8 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, access-control, calendar-access -ETag: "c345629a9689adce5411818c3c29aa43" -Content-Length: 358 +ETag: "a608df84660135cffaa4e0c8e3000df5" +Content-Length: 338 Content-Type: text/xml; charset="utf-8" @@ -11,7 +11,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user1/home/ + /caldav.php/user1/ user1 HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/861-Spec-REPORT-principal.result b/testing/tests/regression-suite/861-Spec-REPORT-principal.result index 7b9526f7..7fb68ba9 100644 --- a/testing/tests/regression-suite/861-Spec-REPORT-principal.result +++ b/testing/tests/regression-suite/861-Spec-REPORT-principal.result @@ -1,8 +1,8 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, access-control, calendar-access -ETag: "8ee6bd9a1b7e15f40e6e24f149c6bf20" -Content-Length: 3720 +ETag: "858ddca3788c4d78126a68ae1ecc123d" +Content-Length: 3460 Content-Type: text/xml; charset="utf-8" @@ -11,7 +11,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/admin/home/ + /caldav.php/admin/ admin HTTP/1.1 200 OK @@ -21,7 +21,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/andrew/home/ + /caldav.php/andrew/ andrew HTTP/1.1 200 OK @@ -31,7 +31,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user1/home/ + /caldav.php/user1/ user1 HTTP/1.1 200 OK @@ -41,7 +41,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user2/home/ + /caldav.php/user2/ user2 HTTP/1.1 200 OK @@ -51,7 +51,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user3/home/ + /caldav.php/user3/ user3 HTTP/1.1 200 OK @@ -61,7 +61,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user4/home/ + /caldav.php/user4/ user4 HTTP/1.1 200 OK @@ -71,7 +71,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user5/home/ + /caldav.php/user5/ user5 HTTP/1.1 200 OK @@ -81,7 +81,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/manager1/home/ + /caldav.php/manager1/ manager1 HTTP/1.1 200 OK @@ -91,7 +91,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/assistant1/home/ + /caldav.php/assistant1/ assistant1 HTTP/1.1 200 OK @@ -101,7 +101,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/resource1/home/ + /caldav.php/resource1/ resource1 HTTP/1.1 200 OK @@ -111,7 +111,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/resource2/home/ + /caldav.php/resource2/ resource2 HTTP/1.1 200 OK @@ -121,7 +121,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/resmgr1/home/ + /caldav.php/resmgr1/ resmgr1 HTTP/1.1 200 OK @@ -131,7 +131,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/teamclient1/home/ + /caldav.php/teamclient1/ teamclient1 HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/862-Spec-REPORT-principal.result b/testing/tests/regression-suite/862-Spec-REPORT-principal.result index c55a5655..d106c4c2 100644 --- a/testing/tests/regression-suite/862-Spec-REPORT-principal.result +++ b/testing/tests/regression-suite/862-Spec-REPORT-principal.result @@ -1,8 +1,8 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, access-control, calendar-access -ETag: "d8fe1f4720e6249cb2fb0711fbed9794" -Content-Length: 688 +ETag: "48570cfdc80325e01292f9a6d0db7289" +Content-Length: 653 Content-Type: text/xml; charset="utf-8" @@ -11,12 +11,12 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user1/home/ + /caldav.php/user1/ user1 - http://mycaldav/caldav.php/user1/ + /caldav.php/user1/ diff --git a/testing/tests/regression-suite/863-Spec-REPORT-principal.result b/testing/tests/regression-suite/863-Spec-REPORT-principal.result index 7b38fea1..bc689a6b 100644 --- a/testing/tests/regression-suite/863-Spec-REPORT-principal.result +++ b/testing/tests/regression-suite/863-Spec-REPORT-principal.result @@ -1,8 +1,8 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, access-control, calendar-access -ETag: "f9a0b07b2c7b0347a9ae26a412baef6b" -Content-Length: 743 +ETag: "d73acd2ac03f8c93b5c7197558e2314b" +Content-Length: 708 Content-Type: text/xml; charset="utf-8" @@ -11,12 +11,12 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/resmgr1/home/ + /caldav.php/resmgr1/ resmgr1 - http://mycaldav/caldav.php/resmgr1/ + /caldav.php/resmgr1/ http://mycaldav/caldav.php/user1/