Skip to content

Commit

Permalink
have to match exact case to overwrite headers ... :(
Browse files Browse the repository at this point in the history
  • Loading branch information
Hartmut Holzgraefe committed Dec 20, 2003
1 parent 25933cb commit a8c8924
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Client/Stream.php
Expand Up @@ -141,7 +141,7 @@ function stream_open($path, $mode, $options, &$opened_path)
$req->setBasicAuth($this->user, @$this->pass);
}
$req->addHeader("Depth", "0");
$req->addHeader("Content-type", "text/xml");
$req->addHeader("Content-Type", "text/xml");
$req->addRawPostData('<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:">
<prop>
Expand Down Expand Up @@ -444,7 +444,7 @@ function dir_opendir($path, $options)
$req->setBasicAuth($this->user, @$this->pass);
}
$req->addHeader("Depth", "1");
$req->addHeader("Content-type", "text/xml");
$req->addHeader("Content-Type", "text/xml");
$req->addRawPostData('<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:">
<prop>
Expand Down
8 changes: 4 additions & 4 deletions examples/opendir.php
Expand Up @@ -2,18 +2,18 @@
// HTTP_WebDAV_Client registers the "webdav:" userland stream
require_once "HTTP/WebDAV/Client.php";

// public webdav server as announced on
// public webdav server as announced on
// http://developer.novell.com/extend/director/1194.html
// WARNING: you should change this to your private server
// as the test service seems to be broken right now
$name = "webdav://devcenter:rocks@webdav.silverstream.com/Director/WebDAVService/main";
$name = "webdav://devcenter:rocks@webdav.silverstream.com/Director/WebDAVService/main/";

$dh = opendir($name);
$dh = opendir($name);
if (!$dh) die("WebDAV connect failed");

while (false != ($file = readdir($dh))) {
echo "$file\n";
}

closedir($name);
closedir($dh);
?>
37 changes: 33 additions & 4 deletions package.xml
Expand Up @@ -19,13 +19,15 @@
</maintainers>

<release>
<version>0.9.5</version>
<date>2003-12-04</date>
<version>0.9.6</version>
<date>2003-12-20</date>
<state>beta</state>
<license>PHP</license>
<notes>
lots of small improvements and additions, now waiting for missing
pieces in the user streams interface ...
- fixed settings of mode flags for stat()/url_stat()
- added missing authentication in lots of places
- added support for rename() and mkdir() (PHP >= 5.0.0b3)
- added lock support (experimental, requires PHP changes not yet in CVS)
</notes>
<deps>
<dep type="php" rel="ge" version="4.3"/>
Expand All @@ -35,6 +37,7 @@ pieces in the user streams interface ...
<dir name="/" baseinstalldir="HTTP/WebDAV">
<file role="php">Client.php</file>
<dir name="Tools">
<file role="php">_parse_lock_response.php</file>
<file role="php">_parse_propfind_response.php</file>
</dir>
<dir name="Client">
Expand All @@ -45,6 +48,32 @@ pieces in the user streams interface ...
</release>

<changelog>
<release>
<version>0.9.5</version>
<date>2003-12-04</date>
<state>beta</state>
<license>PHP</license>
<notes>
lots of small improvements and additions, now waiting for missing
pieces in the user streams interface ...
</notes>
<deps>
<dep type="php" rel="ge" version="4.3"/>
<dep type="pkg" rel="ge" version="1.0">HTTP</dep>
</deps>
<filelist>
<dir name="/" baseinstalldir="HTTP/WebDAV">
<file role="php">Client.php</file>
<dir name="Tools">
<file role="php">_parse_propfind_response.php</file>
</dir>
<dir name="Client">
<file role="php">Stream.php</file>
</dir>
</dir>
</filelist>
</release>

<release>
<version>0.9.0</version>
<date>2003-07-11</date>
Expand Down

0 comments on commit a8c8924

Please sign in to comment.