Home » HTTP » HTTP_WebDAV_Client » Bug #4584
DAV Header parsing failure
Details
| Submitted | 2005-06-14 00:14 UTC |
|---|---|
| From | 2nd dot step at gmail dot com |
| Status | Bogus |
| Package | HTTP_WebDAV_Client |
| PHP Version | 5_0 CVS-2005-06-13 |
| OS | SuSE Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-06-14 00:14 UTC] 2nd dot step at gmail dot com
Description:
------------
If the DAV Server sends a different "DAV-header" as expected, the connect fail.
[_headers] => Array
(
[...]
[DAV] => <http://apache.org/dav/propset/fs/1>
[dav] => <http://apache.org/dav/propset/fs/1>
[...]
)
Solution:
class HTTP_WebDAV_Client_Stream:808
// get the supported DAV levels and extensions
$dav = $req->getResponseHeader("DAV");
$dav = str_replace(array('<', '>'), '', $dav);
$aDav = preg_split('#[,/]#', $dav, -1, PREG_SPLIT_NO_EMPTY);
$this->dav_level = array();
foreach ($aDav as $level) {
$this->dav_level[trim($level)] = true;
}
if (!isset($this->dav_level["1"])) {
// we need at least DAV Level 1 conformance
return false;
}
[2005-06-14 00:25 UTC] 2nd dot step at gmail dot com
Duplicate!
http://pear.php.net/bugs/bug.php?id=1044
http://pear.php.net/bugs/bug.php?id=1045
I am sorry, read before you post.