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

  ID: 12856
  Updated by: daniel.oconnor@gmail.com
  Reported By: schmidt@php.net
  Summary: Directories cannot be accessed without trailing slash
-Status: Open
+Status: Wont fix
  Type: Bug
  Package: HTTP_WebDAV_Client
  Package Version: 1.0.0
  PHP Version: 5.2.0
  Roadmap Versions:
  New Comment:

-Status: Open
+Status: Wont fix
Marking as a wontfix for the moment, because it hasn't moved in ~6
Patches/pull requests welcome.

Previous Comments:

[2009-08-25 08:06:45] cweiske

-Status: Feedback
+Status: Open


[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 @
postedApr 18, '14 at 3:44a
activeApr 18, '14 at 3:44a

1 user in discussion

Daniel Oconnor: 1 post



site design / logo © 2022 Grokbase