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

Re: Problem with write through proxy

From: Stefan Podskubka <s.podskubka_at_hcs.at>
Date: Fri, 01 Jun 2012 09:06:12 +0200

Hello Joseph,

On 30.05.2012 17:40, Joseph Isenberg wrote:
> I'm trying to set up a write through proxy and it was going OK. We
> want the communication between the slave and the master to be
> encrypted so we wanted to use https. I figured out how to get apache
> to do that by adding "SSLProxyEngine on" to the config and it seemed
> to work, but I can't commit a revision that has a copy. I'm getting a
> 502 Bad Gateway error on the COPY request. I'm using http from the
> client to the slave and https between the slave and the master. I
> switched back down to using http for the SVNMasterURI and the copy
> went through. I don't really know anything about the protocol, but I
> think the error is because the destination header has an http url. The
> eventual plan is to use https both between the client and the slave
> and between the slave and the master, but I didn't set up SSL on the
> slave yet. It's possible that if I did have https on the slave and an
> http master uri I would have the same problem.
>

I also had the same problem some years ago when I setup an apache
reverse proxy serving Subversion clients via HTTPS but accessing the
Subversion host behind it via HTTP.
I found out that the Destination header field contains the full
destination URL including the URL scheme that the subversion client is
using to communicate with the server.
I fixed it by rewriting the Destination header on the Apache reverse
proxy using this directive (you need at least Apache 2.2):

RequestHeader edit Destination ^https http early

The Destination header probably also needs some more URL translation if
the path to the repository is different between the Subversion server
and the Apache reverse proxy because the Destination header is not
modified by apache in any way when the request is handled via a proxy
request.

I don't know if the new HTTPv2 protocol shipped with Subversion 1.7
still needs this fix.

Best regards
Stefan
Received on 2012-06-01 09:33:38 CEST

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.