mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-30 03:24:47 +00:00
Debugging namespace change, with updated regression results.
This commit is contained in:
parent
ad17ee8a2b
commit
552bb6f0e8
@ -48,7 +48,7 @@ function add_namespace( $prefix, $namespace ) {
|
||||
|
||||
|
||||
function ns_tag( $in_tag, $namespace=null, $prefix=null ) {
|
||||
global $namespaces;
|
||||
global $namespaces, $prefixes;
|
||||
|
||||
if ( $namespace == null ) {
|
||||
// Attempt to split out from namespace:tag
|
||||
@ -65,6 +65,7 @@ function ns_tag( $in_tag, $namespace=null, $prefix=null ) {
|
||||
$tag = $in_tag;
|
||||
}
|
||||
$namespace = strtolower($namespace);
|
||||
if ( $namespace == 'dav:' ) $namespace = 'DAV:'; // Special case for conventional naming
|
||||
$tag = strtolower($tag);
|
||||
|
||||
if ( $prefix == null ) {
|
||||
@ -83,7 +84,7 @@ function ns_tag( $in_tag, $namespace=null, $prefix=null ) {
|
||||
}
|
||||
$i = "";
|
||||
if ( isset($prefixes[$prefix]) ) {
|
||||
for ( $i=1; $i<20 && isset($prefixes["$prefix$i"]); $i++ ) {
|
||||
for ( $i=1; $i<10 && isset($prefixes["$prefix$i"]); $i++ ) {
|
||||
}
|
||||
}
|
||||
if ( isset($prefixes["$prefix$i"]) ) {
|
||||
@ -100,7 +101,7 @@ function ns_tag( $in_tag, $namespace=null, $prefix=null ) {
|
||||
add_namespace( $prefix, $namespace );
|
||||
}
|
||||
|
||||
return $prefix . ":" . $tag;
|
||||
return $prefix . ($prefix == "" ? "" : ":") . $tag;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:A="http://apache.org/dav/props/">
|
||||
<response>
|
||||
<href>http://mycaldav/caldav.php/user1/home/</href>
|
||||
<propstat>
|
||||
@ -15,9 +15,9 @@
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<executable xmlns="http://apache.org/dav/props/"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<A:executable/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access
|
||||
ETag: "455c90fdc59860d7dfa851ad1f75b4ba"
|
||||
Content-Length: 847
|
||||
ETag: "58323b4af2f8d17c9fd4412652c18a5c"
|
||||
Content-Length: 746
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:C1="http://calendarserver.org/ns/">
|
||||
<response>
|
||||
<href>/caldav.php/user1/home/</href>
|
||||
<propstat>
|
||||
@ -23,10 +23,10 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<schedule-inbox-url xmlns="urn:ietf:params:xml:ns:caldav"/>
|
||||
<schedule-outbox-url xmlns="urn:ietf:params:xml:ns:caldav"/>
|
||||
<dropbox-home-url xmlns="http://calendarserver.org/ns/"/>
|
||||
<notifications-url xmlns="http://calendarserver.org/ns/"/>
|
||||
<C:schedule-inbox-url/>
|
||||
<C:schedule-outbox-url/>
|
||||
<C1:dropbox-home-url/>
|
||||
<C1:notifications-url/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access
|
||||
ETag: "3c6167921378348411a110b1db03b7d4"
|
||||
Content-Length: 796
|
||||
ETag: "d595bef8c261fd561df6bb7eec2f3734"
|
||||
Content-Length: 659
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:C1="http://calendarserver.org/ns/">
|
||||
<response>
|
||||
<href>/</href>
|
||||
<propstat>
|
||||
@ -20,11 +20,11 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<calendar-user-address-set xmlns="urn:ietf:params:xml:ns:caldav"/>
|
||||
<schedule-inbox-url xmlns="urn:ietf:params:xml:ns:caldav"/>
|
||||
<schedule-outbox-url xmlns="urn:ietf:params:xml:ns:caldav"/>
|
||||
<dropbox-home-url xmlns="http://calendarserver.org/ns/"/>
|
||||
<notifications-url xmlns="http://calendarserver.org/ns/"/>
|
||||
<C:calendar-user-address-set/>
|
||||
<C:schedule-inbox-url/>
|
||||
<C:schedule-outbox-url/>
|
||||
<C1:dropbox-home-url/>
|
||||
<C1:notifications-url/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access
|
||||
ETag: "f501a70013d679ecd57dc0981fdb62e1"
|
||||
Content-Length: 5847
|
||||
ETag: "abe3054a40d9f860fe9ccabef5e558db"
|
||||
Content-Length: 5725
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:A="http://apple.com/ns/calendarserver/">
|
||||
<response>
|
||||
<href>/caldav.php/user1/</href>
|
||||
<propstat>
|
||||
@ -22,8 +22,8 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<dropbox-home-url xmlns="http://apple.com/ns/calendarserver/"/>
|
||||
<notifications-url xmlns="http://apple.com/ns/calendarserver/"/>
|
||||
<A:dropbox-home-url/>
|
||||
<A:notifications-url/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
@ -43,8 +43,8 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<dropbox-home-url xmlns="http://apple.com/ns/calendarserver/"/>
|
||||
<notifications-url xmlns="http://apple.com/ns/calendarserver/"/>
|
||||
<A:dropbox-home-url/>
|
||||
<A:notifications-url/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access
|
||||
ETag: "82a2af4a319c7702f65e131574e63754"
|
||||
Content-Length: 1261
|
||||
ETag: "461b0f96e42a2b69d256b99bc8d2ea1e"
|
||||
Content-Length: 1139
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:A="http://apple.com/ns/calendarserver/">
|
||||
<response>
|
||||
<href>/caldav.php/user1/</href>
|
||||
<propstat>
|
||||
@ -22,8 +22,8 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<dropbox-home-url xmlns="http://apple.com/ns/calendarserver/"/>
|
||||
<notifications-url xmlns="http://apple.com/ns/calendarserver/"/>
|
||||
<A:dropbox-home-url/>
|
||||
<A:notifications-url/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
@ -43,8 +43,8 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<dropbox-home-url xmlns="http://apple.com/ns/calendarserver/"/>
|
||||
<notifications-url xmlns="http://apple.com/ns/calendarserver/"/>
|
||||
<A:dropbox-home-url/>
|
||||
<A:notifications-url/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access
|
||||
ETag: "c240d5bc59682fd96a47d4b802052879"
|
||||
Content-Length: 689
|
||||
ETag: "f90fce514cd7d7155fcb48f704e9f171"
|
||||
Content-Length: 651
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:A="http://apple.com/ns/calendarserver/">
|
||||
<response>
|
||||
<href>/caldav.php/user1/</href>
|
||||
<propstat>
|
||||
@ -22,8 +22,8 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<dropbox-home-url xmlns="http://apple.com/ns/calendarserver/"/>
|
||||
<notifications-url xmlns="http://apple.com/ns/calendarserver/"/>
|
||||
<A:dropbox-home-url/>
|
||||
<A:notifications-url/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -39,10 +39,10 @@
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<lockdiscovery xmlns="dav:"/>
|
||||
<source xmlns="dav:"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<lockdiscovery/>
|
||||
<source/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -2,7 +2,7 @@ HTTP/1.1 207 Multi-Status
|
||||
Date: Dow, 01 Jan 2000 00:00:00 GMT
|
||||
DAV: 1, 2, access-control, calendar-access
|
||||
ETag: "deadbeefcafefeeddeadbeefcafefeed"
|
||||
Content-Length: 1219
|
||||
Content-Length: 1141
|
||||
Content-Type: text/xml; charset="utf-8"
|
||||
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
@ -37,12 +37,12 @@ Content-Type: text/xml; charset="utf-8"
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<lockdiscovery xmlns="dav:"/>
|
||||
<source xmlns="dav:"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<bogus-property xmlns="dav:"/>
|
||||
<contentbogosity xmlns="dav:"/>
|
||||
<lockdiscovery/>
|
||||
<source/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
<bogus-property/>
|
||||
<contentbogosity/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -30,10 +30,10 @@
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<lockdiscovery xmlns="dav:"/>
|
||||
<source xmlns="dav:"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<lockdiscovery/>
|
||||
<source/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -38,10 +38,10 @@
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<lockdiscovery xmlns="dav:"/>
|
||||
<source xmlns="dav:"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<lockdiscovery/>
|
||||
<source/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -38,10 +38,10 @@
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<lockdiscovery xmlns="dav:"/>
|
||||
<source xmlns="dav:"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<lockdiscovery/>
|
||||
<source/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
@ -85,10 +85,10 @@
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<lockdiscovery xmlns="dav:"/>
|
||||
<source xmlns="dav:"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<lockdiscovery/>
|
||||
<source/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
@ -132,10 +132,10 @@
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<lockdiscovery xmlns="dav:"/>
|
||||
<source xmlns="dav:"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<lockdiscovery/>
|
||||
<source/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
@ -179,10 +179,10 @@
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<lockdiscovery xmlns="dav:"/>
|
||||
<source xmlns="dav:"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<lockdiscovery/>
|
||||
<source/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
@ -226,10 +226,10 @@
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<lockdiscovery xmlns="dav:"/>
|
||||
<source xmlns="dav:"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<lockdiscovery/>
|
||||
<source/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
@ -273,10 +273,10 @@
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<lockdiscovery xmlns="dav:"/>
|
||||
<source xmlns="dav:"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<lockdiscovery/>
|
||||
<source/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav">
|
||||
<multistatus xmlns="DAV:" xmlns:C="urn:ietf:params:xml:ns:caldav" xmlns:R="urn:mcmillan:bogus:xml:ns:rscds">
|
||||
<response>
|
||||
<href>http://mycaldav/caldav.php/user1/home/</href>
|
||||
<propstat>
|
||||
<prop>
|
||||
<displayname>User One's Calendar</displayname>
|
||||
<arbitrary xmlns="urn:mcmillan:bogus:xml:ns:rscds">A completely bogus property which should be saved.</arbitrary>
|
||||
<R:arbitrary>A completely bogus property which should be saved.</R:arbitrary>
|
||||
</prop>
|
||||
<status>HTTP/1.1 200 OK</status>
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<owner xmlns="dav:"/>
|
||||
<owner/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
@ -39,10 +39,10 @@
|
||||
</propstat>
|
||||
<propstat>
|
||||
<prop>
|
||||
<lockdiscovery xmlns="dav:"/>
|
||||
<source xmlns="dav:"/>
|
||||
<checked-in xmlns="dav:"/>
|
||||
<checked-out xmlns="dav:"/>
|
||||
<lockdiscovery/>
|
||||
<source/>
|
||||
<checked-in/>
|
||||
<checked-out/>
|
||||
</prop>
|
||||
<status>HTTP/1.1 404 Not Found</status>
|
||||
</propstat>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user