Get rid of the last URLs containing protocol://host:port part.

This commit is contained in:
Andrew McMillan 2007-11-25 23:08:17 +13:00
parent e589d2ed5c
commit 1390626449
5 changed files with 32 additions and 32 deletions

View File

@ -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);

View File

@ -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"
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href/>
<href>/caldav.php/user1/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/user1/</calendar-home-set>

View File

@ -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"
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href/>
<href>/caldav.php/admin/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/admin/</calendar-home-set>
@ -18,7 +18,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/andrew/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/andrew/</calendar-home-set>
@ -28,7 +28,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/user1/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/user1/</calendar-home-set>
@ -38,7 +38,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/user2/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/user2/</calendar-home-set>
@ -48,7 +48,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/user3/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/user3/</calendar-home-set>
@ -58,7 +58,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/user4/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/user4/</calendar-home-set>
@ -68,7 +68,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/user5/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/user5/</calendar-home-set>
@ -78,7 +78,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/manager1/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/manager1/</calendar-home-set>
@ -88,7 +88,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/assistant1/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/assistant1/</calendar-home-set>
@ -98,7 +98,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/resource1/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/resource1/</calendar-home-set>
@ -108,7 +108,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/resource2/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/resource2/</calendar-home-set>
@ -118,7 +118,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/resmgr1/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/resmgr1/</calendar-home-set>
@ -128,7 +128,7 @@ Content-Type: text/xml; charset="utf-8"
</propstat>
</response>
<response>
<href/>
<href>/caldav.php/teamclient1/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/teamclient1/</calendar-home-set>

View File

@ -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"
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href/>
<href>/caldav.php/user1/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/user1/</calendar-home-set>
@ -20,8 +20,8 @@ Content-Type: text/xml; charset="utf-8"
<alternate-uri/>
<group-member-set/>
<group-membership>
<href>http://mycaldav/caldav.php/resmgr1/</href>
<href>http://mycaldav/caldav.php/teamclient1/</href>
<href>/caldav.php/resmgr1/</href>
<href>/caldav.php/teamclient1/</href>
</group-membership>
</prop>
<status>HTTP/1.1 200 OK</status>

View File

@ -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"
<?xml version="1.0" encoding="utf-8" ?>
<multistatus xmlns="DAV:">
<response>
<href/>
<href>/caldav.php/resmgr1/</href>
<propstat>
<prop>
<calendar-home-set xmlns="urn:ietf:params:xml:ns:caldav">/caldav.php/resmgr1/</calendar-home-set>
@ -19,9 +19,9 @@ Content-Type: text/xml; charset="utf-8"
<principal-url>/caldav.php/resmgr1/</principal-url>
<alternate-uri/>
<group-member-set>
<href>http://mycaldav/caldav.php/user1/</href>
<href>http://mycaldav/caldav.php/user2/</href>
<href>http://mycaldav/caldav.php/assistant1/</href>
<href>/caldav.php/user1/</href>
<href>/caldav.php/user2/</href>
<href>/caldav.php/assistant1/</href>
</group-member-set>
<group-membership/>
</prop>