3

Are there any tools/instructions/pointers about how to troubleshoot webdav problems on Mac OS X? Any secret mount options, undocumented webdav module logging, anything?

What I usually do is to reroute webdav traffic via Fiddler/Charles reverse-proxy. This way I can see requests and responses flowing between Mac OS X/WebdavFS and server. What I am missing is sone reasons why webdav behaves the way it does. E.g. why is file opened in read-only mode -- was there anything bad in response which caused this? :-(

Edit: I am not asking about specific mac/webdav issue, but about ways to debug webdav issues on Mac. To clarify: I am writing server-side part (i.e. webdav server itself). I often can see all requests/responses. But 1) Mac generates LOT OF REQUESTS, and 2) even when I see requests/responses, I sometimes observe problem and can't find the root cause (E.g., MS Word files are sometimes opened in Read-only mode, and I don't know why)

Peter Štibraný
  • 329
  • 4
  • 11

2 Answers2

3

The OSX Finder requires Dav Level 2 support to mount a WebDAV volume read/write. Specifically working LOCK support is required.

I'd grab ngrep and check out the traffic. Look for Dav: 1,2. Also check out the response to the OPTIONS request that OS X asks when it connects.

The OS X Finder is the only application I know of that uses Chunked Encoding when sending a file via PUT. This is required behavior of any HTTP/1.1 server, very few implement it. Apache does, and I think Jackrabbit does, but few other web servers or reverse proxies do. Check your server logs and look for PUT requests with a 400 result.

Update in response to the note about Word read-only:

You should ensure that the MS-Author-Via: Dav header is present on your responses. This extension to the WebDAV spec is required for Microsoft Office applications to interact with WebDAV servers.

Dave Cheney
  • 18,307
  • 7
  • 48
  • 56
  • DAV: 1,2,3 is there in OPTIONS response. What I am looking for is more a log or some error messages on Mac OS. E.g. sometimes my webdav share gets disconnected, or I get error like -56 (ok, not really, I don't remember exact number now)... but I don't know why. Sometimes I can infer from requests/responses log, but I would like to know why Mac OS X decided that particular response was unexpected. – Peter Štibraný May 24 '09 at 13:55
  • Check your server logs, if you see a PUT request that returns a 400 error code then that is your problem. – Dave Cheney May 24 '09 at 21:45
  • Do you mean PUTs with "Chunked" encoding? This isn't it. My question is more general... not about specific problem. I already tracked down many mac/webdav issues we had, but it's still a pain. – Peter Štibraný May 30 '09 at 16:09
  • Chunked encoding gave us some problems, but not because of chunked itself, but because of "Chunked" with capital C ... Apache's mod_proxy doesn't like that (our jackrabbit-based server is behind reverse proxy). This is now fixed. – Peter Štibraný May 30 '09 at 16:20
  • Have you logged a bug with the httpd developers, the spec says that Chunked and chunked are equivalent. – Dave Cheney May 31 '09 at 03:44
  • I've updated my answer include a note about MS-Author-Via, which may solve your Word read-only problems – Dave Cheney May 31 '09 at 03:47
  • @DaveCheney MS-Author-Via seems to affect only MS Office for windows. – rfg Apr 05 '17 at 19:39
1

You could consider installing DarwinPorts and use "cadaver", the command-line WebDAV client which can give verbose info when connecting to WebDAV shares.