Trying to connect with a browser to a URL like: http://example.com/webdav and also http://example.com/webdav/nodes/story

I do get an authentication prompt but eventually the browser gives up with a "Redirect Loop" error.

Similar trying to connect from Nautilus, using a URL like dav://example.com/webdav/nodes/story. I get prompted to authenticate and then after a long while I get a timeout message:

Error: DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Please select another viewer and try again.

I would be good to add some URL examples to the documentation. I figured the above URLs (and they could be wrong) from your screenshot and test script.

Comments

mariuss’s picture

Just noticed on the "Recent log entries" page that there is a huge list of "Session opened for username" events, this could be related to the loop and continuous authentication.

xcorex’s picture

same here.

Yoran’s picture

@mariuss unfortunaly this amount of log entries are linked to the fact your webDav client can't handle cookies/session. So each time a request is made, there is an authentication on drupal core. I can't help this.

Yoran’s picture

@mariuss & xcorex

Could you try to connect using cadaver in order for me to see more clearly where the problem is ? And if you still have the problem, can I have a copy of debugging output (the one made by error_log, not watchdog) ?

Yoran’s picture

@mariuss I added to chapters on the main page "how to connect" and "how to test". I hope this will fit your needs.

mariuss’s picture

@ulhume, I doubt this is a dav client issue since I used exactly what you are using (at least in the screenshot): firefox and Nautilus, also tried cadaver

What is error_log?

mariuss’s picture

Thanks for the "how to" sections. Now I realize that I need the newest Nautilus, using 2.22.

Tried again using rc3, still no luck. Same error with the browser.

With cadaver is also the same, but I forgot to give you the exact error message:

$ cadaver http://example.com/webdav/
Could not open collection:
301 Moved Permanently
dav:/webdav/?

By "error_log" do you mean apache's error log?

Also, just to make sure we are on the same page here, I made the assumption that the webdav module is self sufficient. Is that correct? Do I need to add or configure special modules in apache?

mariuss’s picture

Just noticed the following two watchdog errors, reported many times, alternatively:
- WebDAV access to GET methodstatus:301 Moved Permanently
- Invalid argument supplied for foreach() in /home/lohas/drupal6/modules/webdav/webdav.module on line 664.

Yoran’s picture

@mariuss
301 redirect normally occurs when you forget the last leading / when accessing a collection. The standard reaction of the dav client should be to correct its calling URL for the next time.

Are you still using RC2 ? If you tried RC3, did you have the same loop problem ?

Yoran’s picture

Oh I seen you other comment, so you're using RC3 :) Still the same connection problem so ?

mariuss’s picture

Yes, same issue with rc3. And getting 301, in a loop, with the / at the end.

Yoran’s picture

Do you have access to you apache logs (errors, not access) ? And if it the case, can you set debugging output to verbose, reproduce the problem and send it to me :
artisan.ulhume@_bad_karma-lab.net (remove the _bad_)

Yoran’s picture

Assigned: Unassigned » Yoran
Status: Active » Fixed

Ok, as mariuss told me, I had a look at "Global Redirect" module which is the cause of the problem here. Global Redirect automaticaly "unslashify" any drupal URL and that is not compatible with WebDAV as every collection URL SHOULD (fixed by RFC) end with a slash.

In order to correct this I made a quick patch for this module ( http://drupal.org/node/313209 ) applying on 6.x-1.0. With this you have a new settings page for global redirect and you can enter exceptions, in this cas, just put "webdav" (without quotes).

I will also in the next RC add a setting to disable redirection on my side, but it'll be more a hack than a feature.

I hope this will help and I think I can close this bug now.

Yoran’s picture

This problem is fixed in -dev release of global redirect.

mariuss’s picture

Thanks for following up on this!

Yoran’s picture

you're welcome :)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.