diff --git a/inc/caldav-PROPFIND.php b/inc/caldav-PROPFIND.php
index dc3243ea..2b3e3cfd 100644
--- a/inc/caldav-PROPFIND.php
+++ b/inc/caldav-PROPFIND.php
@@ -20,7 +20,7 @@ $reply = new XMLDocument( array( 'DAV:' => '' ) );
if ( !isset($request->xml_tags) ) {
// Empty body indicates DAV::allprop request according to RFC4918
- $property_list = 'DAV::allprop';
+ $property_list = array('DAV::allprop');
}
else {
$position = 0;
@@ -41,7 +41,7 @@ else {
default: // prop, include
$subprop = $propwrap->GetElements();
foreach( $subprop AS $k => $v ) {
- if ( is_object($v) && method_exists($v->GetTag()) ) $property_list[] = $v->GetTag();
+ if ( is_object($v) && method_exists($v,'GetTag') ) $property_list[] = $v->GetTag();
}
}
}
diff --git a/testing/tests/regression-suite/0248-Bad-PROPFIND.result b/testing/tests/regression-suite/0248-Bad-PROPFIND.result
new file mode 100644
index 00000000..d8a401d4
--- /dev/null
+++ b/testing/tests/regression-suite/0248-Bad-PROPFIND.result
@@ -0,0 +1,13 @@
+HTTP/1.1 400 Bad Request
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, calendar-proxy, bind, addressbook
+Content-Location: /caldav.php/user1/home/
+ETag: "567b0424ecca3303b030d882be2093ef"
+Content-Length: 86
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+
diff --git a/testing/tests/regression-suite/0248-Bad-PROPFIND.test b/testing/tests/regression-suite/0248-Bad-PROPFIND.test
new file mode 100644
index 00000000..7a8d706d
--- /dev/null
+++ b/testing/tests/regression-suite/0248-Bad-PROPFIND.test
@@ -0,0 +1,19 @@
+#
+# Do a PROPFIND request with junk in the request
+#
+TYPE=PROPFIND
+URL=http://mycaldav/caldav.php/user1/home
+HEAD
+
+HEADER=User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20061013 Thunderbird/1.5.0.7
+HEADER=Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+HEADER=Accept-Language: en-us,en;q=0.5
+HEADER=Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+HEADER=Content-Type: text/xml
+HEADER=Depth: 0
+
+BEGINDATA
+
+
+ENDDATA
+
diff --git a/testing/tests/regression-suite/0249-Empty-PROPFIND.result b/testing/tests/regression-suite/0249-Empty-PROPFIND.result
new file mode 100644
index 00000000..7534b34c
--- /dev/null
+++ b/testing/tests/regression-suite/0249-Empty-PROPFIND.result
@@ -0,0 +1,45 @@
+HTTP/1.1 207 Multi-Status
+Date: Dow, 01 Jan 2000 00:00:00 GMT
+DAV: 1, 2, 3, access-control, calendar-access, calendar-schedule
+DAV: extended-mkcol, calendar-proxy, bind, addressbook
+Content-Location: /caldav.php/user1/home/
+ETag: "55917ad4a56f1fab703fccc3c817fea5"
+Content-Length: 943
+Content-Type: text/xml; charset="utf-8"
+
+
+
+
+ /caldav.php/user1/home/
+
+
+ httpd/unix-directory
+
+
+
+
+ user1 home
+ Dow, 01 Jan 2000 00:00:00 GMT
+ 2009-06-03T00:00:00+12:00
+
+
+
+
+
+
+
+
+
+
+
+
+ /caldav.php/user1/
+
+
+ /caldav.php/user1/
+
+
+ HTTP/1.1 200 OK
+
+
+
diff --git a/testing/tests/regression-suite/0249-Empty-PROPFIND.test b/testing/tests/regression-suite/0249-Empty-PROPFIND.test
new file mode 100644
index 00000000..284a7f77
--- /dev/null
+++ b/testing/tests/regression-suite/0249-Empty-PROPFIND.test
@@ -0,0 +1,17 @@
+#
+# Do a PROPFIND request with no content
+# we continue to see this as a collection...
+#
+TYPE=PROPFIND
+URL=http://mycaldav/caldav.php/user1/home
+HEAD
+
+HEADER=User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20061013 Thunderbird/1.5.0.7
+HEADER=Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
+HEADER=Accept-Language: en-us,en;q=0.5
+HEADER=Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
+HEADER=Depth: 0
+
+BEGINDATA
+ENDDATA
+