[Owncloud] Help with analyzing a nginx reverse proxy/WebDAV problem
Daniel Molkentin
danimo at owncloud.com
Wed Nov 28 15:29:27 UTC 2012
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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/owncloud/attachments/20121128/687bb880/attachment.html>
More information about the Owncloud
mailing list