I am having a similar problem to what's mentioned at
http://svn.haxx.se/users/archive-2005-03/1424.shtml -- namely when
exposing an HTTPS server that proxies DAV requests to a server running
mod_dav over HTTP, copy/move requests fail because the destination
sent by the client for the copy/move uses the external URL (with
https). When mod_dav compares that to the source URL in
dav_lookup_uri(), the scheme and port don't match and a 502 is
returned.

The attached patch attempts to remedy the problem by adding two
configuration directives, "DAVForcedScheme" and "DAVForcedPort". If
"DAVForcedScheme" is set then the uri that dav_lookup_uri() is asked
to lookup is modified to explicitly use the supplied scheme. Similar
deal w/r/t port if "DAVForcedPort" is set.

Setting "DAVForcedScheme http" and "DAVForcedPort 80" solve my problem
in a test setup with mod_proxy+mod_ssl running on port 443
reverse-proxying DAV requests over to mod_dav running on (a different
machine) on port 80.

Any comments on the patch would be appreciated -- it's wonderful, it's
a good solution but could be improved, it's a ridiculous way to solve
this problem, etc.

Thanks,
David

Attachment: dav-forced-scheme-port.diff
Description: Binary data

Reply via email to