[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: COPY causes 502 Bad Gateway through reverse proxy

From: Dick Davies <rasputnik_at_hellooperator.net>
Date: 2005-03-31 14:48:40 CEST

* Seth Daniel <subversion@sethdaniel.org> [0329 00:29]:
> Hello,
>
> I have a setup where my subversion repository is hosted on a
> local/private network and if someone is *outside* this network they can
> make requests to the public reverse proxy.
>
> Both servers (subversion server and reverse proxy) are apache 2.0.53.
> Connections to the reverse proxy are https. The connection to the
> internal subversion server is regular http. Authentication is basic
> auth and is handled by the internal subversion server.

That's your problem, I think. I haven't seen this with subversion, but I
did tunnelling to https:// webdav through stunnel on a mac (the finder
doesn't support ssl, long story).

In a nutshell, DAV moves and copys use fully qualified urls, so the copy
is asking the server to move to https://yadadyada and it thinks that's a
different server.
It's not the request url (which your proxy would rewrite) but the
 url which is passed in one of the headers
(I forget which, think it's something like Destination:).
If it was a relative url it would work. wonder why it's not?

for dav I used cadaver -debug to confirm, you might need tcpdump for svn.

If I'm right you have two options.

1. convert the internal serer to ssl.
2. hack the module. I just overrode the protocol after apache parsed the
destination header.

--- modules/dav/main/util.c.orig Mon Oct 11 16:23:29 2004
+++ modules/dav/main/util.c Tue Oct 12 13:59:56 2004
@@ -175,6 +175,9 @@
         return result;
     }
 
+ /* force the scheme to be ssl */
+ comp.scheme = "https";
+
     /* the URI must be an absoluteURI (WEBDAV S9.3) */
     if (comp.scheme == NULL && must_be_absolute) {
         result.err.status = HTTP_BAD_REQUEST;

-- 
'With that big new contract, I've been able to make those government mandated
upgrades you've all been suing me about.'
		-- Prof. Farnsworth
Rasputin :: Jack of All Trades - Master of Nuns
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Mar 31 14:51:51 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.