diff --git a/inc/caldav-REPORT.php b/inc/caldav-REPORT.php index 15635a4c..1f7f9bfe 100644 --- a/inc/caldav-REPORT.php +++ b/inc/caldav-REPORT.php @@ -97,6 +97,9 @@ function calendar_to_xml( $properties, $item ) { } $url = $c->protocol_server_port_script . $item->dav_name; + $url = preg_replace( '#^(https?://.+)//#', '$1/', $url ); // Ensure we don't double any '/' + $url = preg_replace('#^https?://[^/]+#', '', $url ); + $prop = new XMLElement("prop"); foreach( $properties AS $k => $v ) { switch( $k ) { diff --git a/testing/tests/regression-suite/102-Evo-REPORT-1.result b/testing/tests/regression-suite/102-Evo-REPORT-1.result index d45bdd9f..455549c8 100644 --- a/testing/tests/regression-suite/102-Evo-REPORT-1.result +++ b/testing/tests/regression-suite/102-Evo-REPORT-1.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: "7dd087918d1ab4ba7e7861307b57c6dd" -Content-Length: 341 +ETag: "5d903e7367fc5fd8975cd2a2f12c94ef" +Content-Length: 326 Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics + /caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics "2c32a2f8aba853654eb17fe037a4db4d" diff --git a/testing/tests/regression-suite/105-Evo-REPORT-1.result b/testing/tests/regression-suite/105-Evo-REPORT-1.result index 911c06d3..71e5b574 100644 --- a/testing/tests/regression-suite/105-Evo-REPORT-1.result +++ b/testing/tests/regression-suite/105-Evo-REPORT-1.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: "4b08329b0bd43cb3a95a0e4f8286c423" -Content-Length: 582 +ETag: "278939915085a441aa95fa319fc3bb3a" +Content-Length: 552 Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user1/home/20061101T073004Z.ics + /caldav.php/user1/home/20061101T073004Z.ics "c3658901fd4689d4a1e1d6f08601ef4f" @@ -17,7 +17,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics + /caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics "2c32a2f8aba853654eb17fe037a4db4d" diff --git a/testing/tests/regression-suite/107-Evo-REPORT-1.result b/testing/tests/regression-suite/107-Evo-REPORT-1.result index f0d5e883..e7f99b77 100644 --- a/testing/tests/regression-suite/107-Evo-REPORT-1.result +++ b/testing/tests/regression-suite/107-Evo-REPORT-1.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: "709206be6ed57942c30d98aa629efc6f" -Content-Length: 560 +ETag: "83ce5baee07017b4b40318062103c2ce" +Content-Length: 530 Content-Type: text/xml; charset="utf-8" - http://mycaldav/user1/home/20061101T073004Z.ics + /user1/home/20061101T073004Z.ics "c3658901fd4689d4a1e1d6f08601ef4f" @@ -17,7 +17,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics + /user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics "2c32a2f8aba853654eb17fe037a4db4d" diff --git a/testing/tests/regression-suite/108-Evo-REPORT-1.result b/testing/tests/regression-suite/108-Evo-REPORT-1.result index 32b5acc4..9038e8bc 100644 --- a/testing/tests/regression-suite/108-Evo-REPORT-1.result +++ b/testing/tests/regression-suite/108-Evo-REPORT-1.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: "5a05dff964308972a179d2e7f44bf751" -Content-Length: 596 +ETag: "9f89b851745eccbc4d1da3bf3f0bb9c7" +Content-Length: 570 Content-Type: text/xml; charset="utf-8" - http://myapms/calendar/caldav.php/user1/home/20061101T073004Z.ics + /calendar/caldav.php/user1/home/20061101T073004Z.ics "c3658901fd4689d4a1e1d6f08601ef4f" @@ -17,7 +17,7 @@ Content-Type: text/xml; charset="utf-8" - http://myapms/calendar/caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics + /calendar/caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics "2c32a2f8aba853654eb17fe037a4db4d" diff --git a/testing/tests/regression-suite/203-Moz-REPORT-2.result b/testing/tests/regression-suite/203-Moz-REPORT-2.result index 607ee9da..c1f39df6 100644 --- a/testing/tests/regression-suite/203-Moz-REPORT-2.result +++ b/testing/tests/regression-suite/203-Moz-REPORT-2.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: "a57a6c930b230c67301c4295254a3521" -Content-Length: 2420 +ETag: "6df625ac708940d88e7e400fa0cd2092" +Content-Length: 2390 Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user1/home/20061101T073004Z.ics + /caldav.php/user1/home/20061101T073004Z.ics BEGIN:VCALENDAR @@ -57,7 +57,7 @@ END:VCALENDAR - http://mycaldav/caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics + /caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics BEGIN:VCALENDAR diff --git a/testing/tests/regression-suite/204-Moz-REPORT-3.result b/testing/tests/regression-suite/204-Moz-REPORT-3.result index f9b61fc8..2339c01e 100644 --- a/testing/tests/regression-suite/204-Moz-REPORT-3.result +++ b/testing/tests/regression-suite/204-Moz-REPORT-3.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: "46061ea7ac75102dbb315b82c666c24d" -Content-Length: 1110 +ETag: "62d5362cafb71b92c39ff83bfec5f16d" +Content-Length: 1095 Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/resource2/home/0A5EA1F0F2691A03E917E85F9F255448-0.ics + /caldav.php/resource2/home/0A5EA1F0F2691A03E917E85F9F255448-0.ics BEGIN:VCALENDAR diff --git a/testing/tests/regression-suite/207-Moz-REPORT-4.result b/testing/tests/regression-suite/207-Moz-REPORT-4.result index 33886f34..f7009e58 100644 --- a/testing/tests/regression-suite/207-Moz-REPORT-4.result +++ b/testing/tests/regression-suite/207-Moz-REPORT-4.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: "5ea083d59cfcd77e3baf11ef74297e6e" -Content-Length: 1358 +ETag: "5acea2c1bc8250bf55a3a32f155c0872" +Content-Length: 1343 Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics + /caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics BEGIN:VCALENDAR diff --git a/testing/tests/regression-suite/230-Moz-REPORT-Tasks-Completed.result b/testing/tests/regression-suite/230-Moz-REPORT-Tasks-Completed.result index fc880a82..42d86bec 100644 --- a/testing/tests/regression-suite/230-Moz-REPORT-Tasks-Completed.result +++ b/testing/tests/regression-suite/230-Moz-REPORT-Tasks-Completed.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: "8f48e613721a5ccb5e44c277f7a1a909" -Content-Length: 1630 +ETag: "cf7647a0d4c17b2c0c8dcf418574fe09" +Content-Length: 1604 Content-Type: text/xml; charset="utf-8" - http://myapms/calendar/caldav.php/user1/home/2178279a-aec2-471f-832d-1f6df6203f2f.ics + /calendar/caldav.php/user1/home/2178279a-aec2-471f-832d-1f6df6203f2f.ics "509b0f0d8a3363379f9f5727f5dd74a0" @@ -32,7 +32,7 @@ END:VCALENDAR - http://myapms/calendar/caldav.php/user1/home/917b9e47-b748-4550-a566-657fbe672447.ics + /calendar/caldav.php/user1/home/917b9e47-b748-4550-a566-657fbe672447.ics "cb3d9dc3e8c157f53eba3ea0e1e0f146" diff --git a/testing/tests/regression-suite/231-Moz-REPORT-All-Tasks.result b/testing/tests/regression-suite/231-Moz-REPORT-All-Tasks.result index 225ff38b..ce3399e9 100644 --- a/testing/tests/regression-suite/231-Moz-REPORT-All-Tasks.result +++ b/testing/tests/regression-suite/231-Moz-REPORT-All-Tasks.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: "2d56ad662a3857cbba346a51e2287e22" -Content-Length: 4276 +ETag: "4a177807973966b4873ffa2f0080b4a1" +Content-Length: 4224 Content-Type: text/xml; charset="utf-8" - http://myapms/calendar/caldav.php/user1/home/0575d895-a006-4ed8-9be6-0d1b6b6b1f96.ics + /calendar/caldav.php/user1/home/0575d895-a006-4ed8-9be6-0d1b6b6b1f96.ics "00ad5eb1eb5507884710b0b66aa5d5c4" @@ -54,7 +54,7 @@ END:VCALENDAR - http://myapms/calendar/caldav.php/user1/home/2178279a-aec2-471f-832d-1f6df6203f2f.ics + /calendar/caldav.php/user1/home/2178279a-aec2-471f-832d-1f6df6203f2f.ics "509b0f0d8a3363379f9f5727f5dd74a0" @@ -78,7 +78,7 @@ END:VCALENDAR - http://myapms/calendar/caldav.php/user1/home/917b9e47-b748-4550-a566-657fbe672447.ics + /calendar/caldav.php/user1/home/917b9e47-b748-4550-a566-657fbe672447.ics "cb3d9dc3e8c157f53eba3ea0e1e0f146" @@ -104,7 +104,7 @@ END:VCALENDAR - http://myapms/calendar/caldav.php/user1/home/b1679f77-673d-4f46-b3eb-2420e1bba301.ics + /calendar/caldav.php/user1/home/b1679f77-673d-4f46-b3eb-2420e1bba301.ics "a2990674708634a311bb98a59865ca50" diff --git a/testing/tests/regression-suite/850-Spec-REPORT-1.result b/testing/tests/regression-suite/850-Spec-REPORT-1.result index 8a783df5..d7b3ba86 100644 --- a/testing/tests/regression-suite/850-Spec-REPORT-1.result +++ b/testing/tests/regression-suite/850-Spec-REPORT-1.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: "3140e532d35ae4918005eb9bf5fcc26b" -Content-Length: 1456 +ETag: "ed933141b8d662fd7a79e37399302fa4" +Content-Length: 1441 Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user1/home/20061101T073004Z.ics + /caldav.php/user1/home/20061101T073004Z.ics "c3658901fd4689d4a1e1d6f08601ef4f" diff --git a/testing/tests/regression-suite/851-Spec-REPORT-1.result b/testing/tests/regression-suite/851-Spec-REPORT-1.result index 33c243fb..d92fc1ac 100644 --- a/testing/tests/regression-suite/851-Spec-REPORT-1.result +++ b/testing/tests/regression-suite/851-Spec-REPORT-1.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: "8bb1ae7c599f81130860154adb77364b" -Content-Length: 5175 +ETag: "3902e726b3e12b996ddf533065b131ab" +Content-Length: 5115 Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics + /caldav.php/user1/home/3F4CF6227300FD062D9EF3CDFB30D32D-0.ics "2c32a2f8aba853654eb17fe037a4db4d" @@ -51,7 +51,7 @@ END:VCALENDAR - http://mycaldav/caldav.php/user1/home/20061101T073004Z.ics + /caldav.php/user1/home/20061101T073004Z.ics "c3658901fd4689d4a1e1d6f08601ef4f" @@ -101,7 +101,7 @@ END:VCALENDAR - http://mycaldav/caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics + /caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics "a1c6404d61190f9574e2bfd69383f144" @@ -147,7 +147,7 @@ END:VCALENDAR - http://mycaldav/caldav.php/user1/home/1906b3ca-4890-468a-9b58-1de74bf2c716.ics + /caldav.php/user1/home/1906b3ca-4890-468a-9b58-1de74bf2c716.ics "5def8ae2b20893a1c7f4dbaeb008f2f1" diff --git a/testing/tests/regression-suite/900-Moz-REPORT.result b/testing/tests/regression-suite/900-Moz-REPORT.result index 166138ab..3bb0dede 100644 --- a/testing/tests/regression-suite/900-Moz-REPORT.result +++ b/testing/tests/regression-suite/900-Moz-REPORT.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: "78f60a204e7deae626d7a11a8f7f8d8e" -Content-Length: 7901 +ETag: "add7fd32d70e4f7378b7aff4cf4e32e1" +Content-Length: 7796 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/xml; charset="utf-8" @@ -10,7 +10,7 @@ Content-Type: text/xml; charset="utf-8" - http://mycaldav/caldav.php/user1/home/1906b3ca-4890-468a-9b58-1de74bf2c716.ics + /caldav.php/user1/home/1906b3ca-4890-468a-9b58-1de74bf2c716.ics BEGIN:VCALENDAR @@ -56,7 +56,7 @@ END:VCALENDAR - http://mycaldav/caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics + /caldav.php/user1/home/4aaf8f37-f232-4c8e-a72e-e171d4c4fe54.ics BEGIN:VCALENDAR @@ -101,7 +101,7 @@ END:VCALENDAR - http://mycaldav/caldav.php/user1/home/71e2ae82-7870-11db-c6d6-f6927c144649.ics + /caldav.php/user1/home/71e2ae82-7870-11db-c6d6-f6927c144649.ics BEGIN:VCALENDAR @@ -141,7 +141,7 @@ END:VCALENDAR - http://mycaldav/caldav.php/user1/home/9d050be7-8a02-4355-8ed3-02a9fc5f473f.ics + /caldav.php/user1/home/9d050be7-8a02-4355-8ed3-02a9fc5f473f.ics BEGIN:VCALENDAR @@ -186,7 +186,7 @@ END:VCALENDAR - http://mycaldav/caldav.php/user1/home/AAA9318E-37D9-4319-8626-95ECD3D3B243.ics + /caldav.php/user1/home/AAA9318E-37D9-4319-8626-95ECD3D3B243.ics BEGIN:VCALENDAR @@ -241,7 +241,7 @@ END:VCALENDAR - http://mycaldav/caldav.php/user1/home/da81c0ee-7871-11db-c6d6-f6927c144649.ics + /caldav.php/user1/home/da81c0ee-7871-11db-c6d6-f6927c144649.ics BEGIN:VCALENDAR @@ -264,7 +264,7 @@ END:VCALENDAR - http://mycaldav/caldav.php/user1/home/fbd57454-d966-4a14-8341-abe1edb1ae66.ics + /caldav.php/user1/home/fbd57454-d966-4a14-8341-abe1edb1ae66.ics BEGIN:VCALENDAR