[Owncloud] Help with analyzing a nginx reverse proxy/WebDAV problem

Daniel Molkentin danimo at owncloud.com
Thu Nov 29 12:09:17 UTC 2012


I found the issue, it's in SabreDAV: https://github.com/evert/SabreDAV/issues/174. Let's see if I can convince Evert :-)

In the worst case, we would have to apply a patch to 3rdparty/ :(

Cheers,
 Daniel 

On 28.11.2012, at 16:29, Daniel Molkentin wrote:

> Hi,
> 
> I need some help with tracing down a problem people are reporting when using nginx:
> 
> Given the following setup:
> 
> owncloud/apache <---> nginx reverse proxy <---> client
> 
> We see the following:
> 
> nginx -> apache:
> 
> PROPFIND /remote.php/webdav/clientsync HTTP/1.0
> ...
> 
> apache -> nginx:
> 
> HTTP/1.1 401 Unauthorized
> ...
> 
> <?xml version="1.0" encoding="utf-8"?>
> <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
>   <s:exception>Sabre_DAV_Exception_NotAuthenticated</s:exception>
>   <s:message>No basic authentication headers were found</s:message>
>   <s:sabredav-version>1.6.4</s:sabredav-version>
> </d:error>
> 
> Because nginx can only speak HTTP/1.0 to its backends (and actually has nicely notified the server that it wants to talk 1.0 to ownCloud), it expects Apache/ownCloud/SabreDAV to respond with HTTP/1.0. Instead, ownCloud responds with HTTP/1.1. This leads to a rather unintended reaction by nginx, forwarding the request to the client:
> 
> ...
> Transfer-Encoding: chunked
> 
> e75
> 32bf
> <?xml version="1.0" encoding="utf-8"?>
> 
> This 'double chunked encoding' is a result of a confused nginx, which expected HTTP/1.0, but received 1.1. This leads to an error on the webdav client (this includes the ownCloud client). According to http://forum.nginx.org/read.php?2,213632,213637, the fix on our side should be to downgrade to HTTP/1.0 if asked to.
> 
> Any leads on where to fix this? ownCloud? SabreDAV?
> 
> Cheers,
>   Daniel
> 
> --
> www.owncloud.com - Your Data, Your Cloud, Your Way!
> 
> ownCloud GmbH, GF: Markus Rex, Holger Dyroff
> Schloßäckerstrasse 26a, 90443 Nürnberg, HRB 28050 (AG Nürnberg)
> 
> _______________________________________________
> Owncloud mailing list
> Owncloud at kde.org
> https://mail.kde.org/mailman/listinfo/owncloud

--
www.owncloud.com - Your Data, Your Cloud, Your Way!

ownCloud GmbH, GF: Markus Rex, Holger Dyroff
Schloßäckerstrasse 26a, 90443 Nürnberg, HRB 28050 (AG Nürnberg)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20121129/67174d3d/attachment.html>


More information about the Owncloud mailing list