tatsuhiro-t / spdylay

The experimental SPDY protocol version 2, 3 and 3.1 implementation in C
http://tatsuhiro-t.github.io/spdylay/
MIT License
602 stars 103 forks source link

shrpx breaks WebDAV? #86

Open moparisthebest opened 11 years ago

moparisthebest commented 11 years ago

I've been using shrpx in front of lighttpd for quite awhile now, but have just installed a php application called ownCloud, which provides access to files over WebDAV and calendar and contact support via CalDAV and CardDAV (which actually just go over WebDAV).

Strangely, in the Dolphin file manager in Kubuntu 12.04 I can access the share over shrpx with this URL, but it is the only application I've found so far that works over shrpx: webdavs://example.org/owncloud/remote.php/webdav/

Mounting with davfs2 on the command line over shrpx gives this:

mount.davfs: Mounting failed.
Could not parse response status line

However, if I turn off shrpx and connect it directly to lighttpd, it works fine.

I also cannot connect with the aCal or ownCloud android app, or Mozilla Thunderbird's Lightning calendar addon over shrpx, but again they work perfectly connecting to directly lighttpd.

I've ruled out this being a SSL cipher issue as I use the exact same options in lighttpd and shrpx, and have verified that from the outside as well with ssllabs' test.

Edit: If it needed saying, everything is behind HTTP Auth handled by lighttpd, but I doubt this has anything to do with it.

So I'd say it's more likely than not that the error is somewhere on shrpx's end, rather than all of these heavily used and well tested applications. If you have any ideas on how I could troubleshoot this to get more details, let me know. Thanks!

tatsuhiro-t commented 11 years ago

I don't know much about WebDAV protocol. How does it look like in HTTP request and response perspective? I have not care about the protocols other than http and https in shrpx, so there may be some bad assertion in the code base.

moparisthebest commented 11 years ago

https://en.wikipedia.org/wiki/WebDAV

It basically just provides extra commands in addition to the standard GET and POST, I found I can make shrpx output headers, so I'll try get lighttpd to output headers someplace as well, and then I can compare the output and find the difference...

tatsuhiro-t commented 11 years ago

OK, I found the cause. Shrpx does not handle status code 207 and it is missing in the response headers. The commit af85606 fixes this issue.

moparisthebest commented 11 years ago

That commit fixes the problem with davfs2, and mounting webdav from the command line works fine now, excellent. However, strangely enough, the CalDav calendar support in Thunderbird's Lightning extension still won't work, but will when connected directly to lighttpd, so something must still be missing. I'll try to figure it out this weekend.