diff --git a/inc/caldav-PROPFIND.php b/inc/caldav-PROPFIND.php index e3588714..a366abc5 100644 --- a/inc/caldav-PROPFIND.php +++ b/inc/caldav-PROPFIND.php @@ -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; } diff --git a/testing/tests/regression-suite/401-Cadaver-PROPFIND-1.result b/testing/tests/regression-suite/401-Cadaver-PROPFIND-1.result index 8a43ce96..c20d0286 100644 --- a/testing/tests/regression-suite/401-Cadaver-PROPFIND-1.result +++ b/testing/tests/regression-suite/401-Cadaver-PROPFIND-1.result @@ -1,5 +1,5 @@ - + http://mycaldav/caldav.php/user1/home/ @@ -15,9 +15,9 @@ - - - + + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/510-iCal-PROPFIND.result b/testing/tests/regression-suite/510-iCal-PROPFIND.result index 49c31771..2ff57364 100644 --- a/testing/tests/regression-suite/510-iCal-PROPFIND.result +++ b/testing/tests/regression-suite/510-iCal-PROPFIND.result @@ -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" - + /caldav.php/user1/home/ @@ -23,10 +23,10 @@ Content-Type: text/xml; charset="utf-8" - - - - + + + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/511-iCal-PROPFIND.result b/testing/tests/regression-suite/511-iCal-PROPFIND.result index 35da6638..ef9a43e0 100644 --- a/testing/tests/regression-suite/511-iCal-PROPFIND.result +++ b/testing/tests/regression-suite/511-iCal-PROPFIND.result @@ -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" - + / @@ -20,11 +20,11 @@ Content-Type: text/xml; charset="utf-8" - - - - - + + + + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/602-Soho-PROPFIND.result b/testing/tests/regression-suite/602-Soho-PROPFIND.result index 69528def..877fc9c1 100644 --- a/testing/tests/regression-suite/602-Soho-PROPFIND.result +++ b/testing/tests/regression-suite/602-Soho-PROPFIND.result @@ -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" - + /caldav.php/user1/ @@ -22,8 +22,8 @@ Content-Type: text/xml; charset="utf-8" - - + + HTTP/1.1 404 Not Found @@ -43,8 +43,8 @@ Content-Type: text/xml; charset="utf-8" - - + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/603-Soho-PROPFIND.result b/testing/tests/regression-suite/603-Soho-PROPFIND.result index 0aa867ef..3edfc407 100644 --- a/testing/tests/regression-suite/603-Soho-PROPFIND.result +++ b/testing/tests/regression-suite/603-Soho-PROPFIND.result @@ -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" - + /caldav.php/user1/ @@ -22,8 +22,8 @@ Content-Type: text/xml; charset="utf-8" - - + + HTTP/1.1 404 Not Found @@ -43,8 +43,8 @@ Content-Type: text/xml; charset="utf-8" - - + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/604-Soho-PROPFIND.result b/testing/tests/regression-suite/604-Soho-PROPFIND.result index 17697d3c..25576b7a 100644 --- a/testing/tests/regression-suite/604-Soho-PROPFIND.result +++ b/testing/tests/regression-suite/604-Soho-PROPFIND.result @@ -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" - + /caldav.php/user1/ @@ -22,8 +22,8 @@ Content-Type: text/xml; charset="utf-8" - - + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/820-Spec-PROPFIND-1.result b/testing/tests/regression-suite/820-Spec-PROPFIND-1.result index 963cdd0e..00252749 100644 --- a/testing/tests/regression-suite/820-Spec-PROPFIND-1.result +++ b/testing/tests/regression-suite/820-Spec-PROPFIND-1.result @@ -39,10 +39,10 @@ - - - - + + + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/821-Spec-PROPFIND-2.result b/testing/tests/regression-suite/821-Spec-PROPFIND-2.result index 92c49000..1b3fb3c5 100644 --- a/testing/tests/regression-suite/821-Spec-PROPFIND-2.result +++ b/testing/tests/regression-suite/821-Spec-PROPFIND-2.result @@ -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" @@ -37,12 +37,12 @@ Content-Type: text/xml; charset="utf-8" - - - - - - + + + + + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/822-Spec-PROPFIND-3.result b/testing/tests/regression-suite/822-Spec-PROPFIND-3.result index 1e021b20..8176541b 100644 --- a/testing/tests/regression-suite/822-Spec-PROPFIND-3.result +++ b/testing/tests/regression-suite/822-Spec-PROPFIND-3.result @@ -30,10 +30,10 @@ - - - - + + + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/826-Spec-PROPFIND.result b/testing/tests/regression-suite/826-Spec-PROPFIND.result index b82c988d..a0aaa047 100644 --- a/testing/tests/regression-suite/826-Spec-PROPFIND.result +++ b/testing/tests/regression-suite/826-Spec-PROPFIND.result @@ -38,10 +38,10 @@ - - - - + + + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/827-Spec-PROPFIND.result b/testing/tests/regression-suite/827-Spec-PROPFIND.result index 7bb50089..9fe8cf78 100644 --- a/testing/tests/regression-suite/827-Spec-PROPFIND.result +++ b/testing/tests/regression-suite/827-Spec-PROPFIND.result @@ -38,10 +38,10 @@ - - - - + + + + HTTP/1.1 404 Not Found @@ -85,10 +85,10 @@ - - - - + + + + HTTP/1.1 404 Not Found @@ -132,10 +132,10 @@ - - - - + + + + HTTP/1.1 404 Not Found @@ -179,10 +179,10 @@ - - - - + + + + HTTP/1.1 404 Not Found @@ -226,10 +226,10 @@ - - - - + + + + HTTP/1.1 404 Not Found @@ -273,10 +273,10 @@ - - - - + + + + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/843-Spec-PROPFIND.result b/testing/tests/regression-suite/843-Spec-PROPFIND.result index 3825c211..844a2f62 100644 --- a/testing/tests/regression-suite/843-Spec-PROPFIND.result +++ b/testing/tests/regression-suite/843-Spec-PROPFIND.result @@ -1,17 +1,17 @@ - + http://mycaldav/caldav.php/user1/home/ User One's Calendar - A completely bogus property which should be saved. + A completely bogus property which should be saved. HTTP/1.1 200 OK - + HTTP/1.1 404 Not Found diff --git a/testing/tests/regression-suite/870-Principal-PROPFIND.result b/testing/tests/regression-suite/870-Principal-PROPFIND.result index 68f6c38b..6072e362 100644 --- a/testing/tests/regression-suite/870-Principal-PROPFIND.result +++ b/testing/tests/regression-suite/870-Principal-PROPFIND.result @@ -39,10 +39,10 @@ - - - - + + + + HTTP/1.1 404 Not Found