Edit report at http://pear.php.net/bugs/bug.php?id=12856&edit=1

ID: 12856
Updated by: cweiske@php.net
Reported By: schmidt at php dot net
Summary: Directories cannot be accessed without trailing slash
-Status: Feedback
+Status: Open
Type: Bug
Package: HTTP_WebDAV_Client
Package Version: 1.0.0
PHP Version: 5.2.0
Roadmap Versions:
New Comment:

-Status: Feedback
+Status: Open

Previous Comments:

[2008-05-19 04:11:41] kawai

I think HTTP_WebDAV_Client MAY handle redirections as what is done in
http stream wrapper.


[2008-05-19 04:07:28] kawai

In RFC2616 section 10.3, the spec says:
"The action required MAY be carried out by the user agent without
interaction with the user if and only if the method used in the second
request is GET or HEAD."

If you're using Apache httpd, consider using "redirect-carefully"
environment variable:


[2008-04-23 23:23:13] hholzgra

Which server are you getting the 301 response from?

I didn't expect a webdav server to issue redirect response headers ...
but these might actually be valid and so need to be handled indeed

(Note to self: check whether HTTP_WebDAV_Server should redirect on
collection without trailing slash, too ...)


[2008-01-08 12:14:39] schmidt

For regular files, the trailing slash in directory names is optional.
E.g. is_dir('/tmp') and is_dir('/tmp/') are equivalent.

With HTTP_WebDAV_Client the trailing slash is required. E.g. if
file_exists('webdav://exampel.com/foo/') returns true, then
file_exists('webdav://exampel.com/foo') returns false.

For consistency with the filesystem, I think HTTP_WebDAV_Client should
support both variants.

As a quick fix I have added the following the following to

+ if ($req->getResponseCode() == 301) {
+ $this->url .= '/';
+ return $this->_check_options();
+ }
if ($req->getResponseCode() != 200) {
return false;


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedAug 25, '09 at 6:06a
activeAug 25, '09 at 6:06a

1 user in discussion

Cweiske: 1 post



site design / logo © 2022 Grokbase