diff --git a/inc/caldav-REPORT-principal.php b/inc/caldav-REPORT-principal.php index 9ebc2067..549f2f0d 100644 --- a/inc/caldav-REPORT-principal.php +++ b/inc/caldav-REPORT-principal.php @@ -39,7 +39,7 @@ function principal_to_xml( $properties, $item ) { $group = array(); if ( $qry->Exec("REPORT-principal") && $qry->rows > 0 ) { while( $membership = $qry->Fetch() ) { - $group[] = new XMLElement("href", sprintf( "%s/%s/", $c->protocol_server_port_script, $membership->username) ); + $group[] = new XMLElement("href", ConstructURL( "/". $membership->username . "/") ); } } $prop->NewElement("group-member-set", $group ); @@ -49,7 +49,7 @@ function principal_to_xml( $properties, $item ) { $group = array(); if ( $qry->Exec("REPORT-principal") && $qry->rows > 0 ) { while( $membership = $qry->Fetch() ) { - $group[] = new XMLElement("href", sprintf( "%s/%s/", $c->protocol_server_port_script, $membership->username) ); + $group[] = new XMLElement("href", ConstructURL( "/". $membership->username . "/") ); } } $prop->NewElement("group-membership", $group ); @@ -68,7 +68,7 @@ function principal_to_xml( $properties, $item ) { $status = new XMLElement("status", "HTTP/1.1 200 OK" ); $propstat = new XMLElement( "propstat", array( $prop, $status) ); - $href = new XMLElement("href", $url ); + $href = new XMLElement("href", $principal_url ); $elements = array($href,$propstat); diff --git a/testing/tests/regression-suite/860-Spec-REPORT-principal.result b/testing/tests/regression-suite/860-Spec-REPORT-principal.result index b7fe7f32..57bf54bb 100644 --- a/testing/tests/regression-suite/860-Spec-REPORT-principal.result +++ b/testing/tests/regression-suite/860-Spec-REPORT-principal.result @@ -1,14 +1,14 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, access-control, calendar-access -ETag: "a608df84660135cffaa4e0c8e3000df5" -Content-Length: 338 +ETag: "325db06f30c85ce69b1aab60837300f7" +Content-Length: 362 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ /caldav.php/user1/ diff --git a/testing/tests/regression-suite/861-Spec-REPORT-principal.result b/testing/tests/regression-suite/861-Spec-REPORT-principal.result index 7fb68ba9..96f5d967 100644 --- a/testing/tests/regression-suite/861-Spec-REPORT-principal.result +++ b/testing/tests/regression-suite/861-Spec-REPORT-principal.result @@ -1,14 +1,14 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, access-control, calendar-access -ETag: "858ddca3788c4d78126a68ae1ecc123d" -Content-Length: 3460 +ETag: "c1552b9c365c15b3e3e6ca730e56e2be" +Content-Length: 3797 Content-Type: text/xml; charset="utf-8" - + /caldav.php/admin/ /caldav.php/admin/ @@ -18,7 +18,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/andrew/ /caldav.php/andrew/ @@ -28,7 +28,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ /caldav.php/user1/ @@ -38,7 +38,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/user2/ /caldav.php/user2/ @@ -48,7 +48,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/user3/ /caldav.php/user3/ @@ -58,7 +58,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/user4/ /caldav.php/user4/ @@ -68,7 +68,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/user5/ /caldav.php/user5/ @@ -78,7 +78,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/manager1/ /caldav.php/manager1/ @@ -88,7 +88,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/assistant1/ /caldav.php/assistant1/ @@ -98,7 +98,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/resource1/ /caldav.php/resource1/ @@ -108,7 +108,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/resource2/ /caldav.php/resource2/ @@ -118,7 +118,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/resmgr1/ /caldav.php/resmgr1/ @@ -128,7 +128,7 @@ Content-Type: text/xml; charset="utf-8" - + /caldav.php/teamclient1/ /caldav.php/teamclient1/ diff --git a/testing/tests/regression-suite/862-Spec-REPORT-principal.result b/testing/tests/regression-suite/862-Spec-REPORT-principal.result index d106c4c2..fe17579e 100644 --- a/testing/tests/regression-suite/862-Spec-REPORT-principal.result +++ b/testing/tests/regression-suite/862-Spec-REPORT-principal.result @@ -1,14 +1,14 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, access-control, calendar-access -ETag: "48570cfdc80325e01292f9a6d0db7289" -Content-Length: 653 +ETag: "5870b1abbdaf891cb5b5891c150305cd" +Content-Length: 647 Content-Type: text/xml; charset="utf-8" - + /caldav.php/user1/ /caldav.php/user1/ @@ -20,8 +20,8 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/resmgr1/ - http://mycaldav/caldav.php/teamclient1/ + /caldav.php/resmgr1/ + /caldav.php/teamclient1/ HTTP/1.1 200 OK diff --git a/testing/tests/regression-suite/863-Spec-REPORT-principal.result b/testing/tests/regression-suite/863-Spec-REPORT-principal.result index bc689a6b..19356a18 100644 --- a/testing/tests/regression-suite/863-Spec-REPORT-principal.result +++ b/testing/tests/regression-suite/863-Spec-REPORT-principal.result @@ -1,14 +1,14 @@ HTTP/1.1 207 Multi-Status Date: Dow, 01 Jan 2000 00:00:00 GMT DAV: 1, 2, access-control, calendar-access -ETag: "d73acd2ac03f8c93b5c7197558e2314b" -Content-Length: 708 +ETag: "c48188f2dc50ffba44c958e04f237d69" +Content-Length: 689 Content-Type: text/xml; charset="utf-8" - + /caldav.php/resmgr1/ /caldav.php/resmgr1/ @@ -19,9 +19,9 @@ Content-Type: text/xml; charset="utf-8" /caldav.php/resmgr1/ - http://mycaldav/caldav.php/user1/ - http://mycaldav/caldav.php/user2/ - http://mycaldav/caldav.php/assistant1/ + /caldav.php/user1/ + /caldav.php/user2/ + /caldav.php/assistant1/