Handling of missing leading slash for collection URL on windows webdav client
| Project: | WebDAV for Drupal |
| Version: | 6.x-1.0-rc8 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
I have been trying out this fine module using a windows webdav client (windows XP).
It seems that Microsoft has made a buggy impl. of the client, but since I figure it is much easier to just handle that bug rather than asking Microsoft to fix it, I am posting here.
The problem is that even though I give a path like /mysite/webdav/ when I add the network place the URL that the client requests is /mysite/webdav. The resulting redirection (which I guess is put in place to handle this) is failing for some reason.
I have recorded the conversation using TCPMON:
Initial request:
OPTIONS /mysite HTTP/1.1
User-Agent: Microsoft Data Access Internet Publishing Provider Cache Manager
Host: 127.0.0.1
Content-Length: 0
Connection: Keep-Alive
Cookie: SESS73686fcc5b297395865a5cb64e3775cc=b36u9if91uandk8sf47dc1k123; SESSe14b9fea3d8d6bbe38b85fa07f85e0fe=fh3c9947llv0dkkbt93f56m1r1; SESS1bb1aa82e97b50af74116595a4de217f=bvjcal81r0u4eefi900i5nm8d7; SESSb0c9b127577fc0bc5091a41ecaf10f32=i46vrikniuv5f5kultihrr6fo4; SESSec3e6ab0c83631cf212b19141ef538e3=d61u0m2kml0lecsoff3fvum4a2
OPTIONS /mysite/webdav HTTP/1.1
Accept-Language: da, en-us;q=0.5
User-Agent: Microsoft Data Access Internet Publishing Provider DAV 1.1
Host: localhost:8081
Content-Length: 0
Connection: Keep-Alive
Cookie: SESS73686fcc5b297395865a5cb64e3775cc=b36u9if91uandk8sf47dc1k123; SESSe14b9fea3d8d6bbe38b85fa07f85e0fe=fh3c9947llv0dkkbt93f56m1r1; SESS1bb1aa82e97b50af74116595a4de217f=bvjcal81r0u4eefi900i5nm8d7; SESSb0c9b127577fc0bc5091a41ecaf10f32=i46vrikniuv5f5kultihrr6fo4; SESSec3e6ab0c83631cf212b19141ef538e3=d61u0m2kml0lecsoff3fvum4a2
Authorization: Basic bXBoOm1hZHMwMQ==
GET /_vti_inf.html HTTP/1.1
Date: Fri, 02 Oct 2009 08:39:27 GMT
MIME-Version: 1.0
Accept: */*
User-Agent: Mozilla/2.0 (compatible; MS FrontPage 4.0)
Host: localhost:8081
Accept: auth/sicily
Content-Length: 0
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: SESS73686fcc5b297395865a5cb64e3775cc=b36u9if91uandk8sf47dc1k123; SESSe14b9fea3d8d6bbe38b85fa07f85e0fe=fh3c9947llv0dkkbt93f56m1r1; SESS1bb1aa82e97b50af74116595a4de217f=bvjcal81r0u4eefi900i5nm8d7; SESSb0c9b127577fc0bc5091a41ecaf10f32=i46vrikniuv5f5kultihrr6fo4; SESSec3e6ab0c83631cf212b19141ef538e3=d61u0m2kml0lecsoff3fvum4a2
POST /_vti_bin/shtml.exe/_vti_rpc HTTP/1.1
Date: Fri, 02 Oct 2009 08:39:27 GMT
MIME-Version: 1.0
User-Agent: MSFrontPage/4.0
Host: localhost:8081
Accept: auth/sicily
Content-Length: 41
Content-Type: application/x-www-form-urlencoded
X-Vermeer-Content-Type: application/x-www-form-urlencoded
Connection: Keep-Alive
Cache-Control: no-cache
method=server+version%3a4%2e0%2e2%2e4715Which gives the following response:
HTTP/1.1 301 Moved Permanently
Date: Fri, 02 Oct 2009 08:39:27 GMT
Server: Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.8
Location: http://127.0.0.1/mysite/
Content-Length: 231
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://127.0.0.1/mysite/">here</a>.</p>
</body></html>
HTTP/1.1 301 Moved Permanently
Date: Fri, 02 Oct 2009 08:39:27 GMT
Server: Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.8
X-Powered-By: PHP/5.2.8
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified: Fri, 02 Oct 2009 08:39:27 GMT
Cache-Control: store, no-cache, must-revalidate
Cache-Control: post-check=0, pre-check=0
X-Dav-Powered-By: Drupal WebDAV (+http://drupal.org/project/webdav)
MS-Author-Via: DAV
X-WebDAV-Status: 200 OK
DAV: 1, 2
Allow: OPTIONS, PROPFIND, PROPPATCH, MKCOL, GET, PUT, DELETE, COPY, MOVE, LOCK, UNLOCK, HEAD
Content-length: 0
Location: http://localhost:8081/mysite/webdav/
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
HTTP/1.1 404 Not Found
Date: Fri, 02 Oct 2009 08:39:27 GMT
Server: Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.8
Content-Length: 211
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /_vti_inf.html was not found on this server.</p>
</body></html>
HTTP/1.1 404 Not Found
Date: Fri, 02 Oct 2009 08:39:27 GMT
Server: Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8i PHP/5.2.8
Content-Length: 225
Keep-Alive: timeout=5, max=97
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /_vti_bin/shtml.exe/_vti_rpc was not found on this server.</p>
</body></html>I have been doing some debugging and verified that $_SERVER['REQUEST_URI'] in function webdav_handler() is infact /mysite/webdav even though I have the supply a trailing slash in the webdav client.
Can you come up with a way to work around this?
Thanks.
