You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Joseph Isenberg <ji...@welldoc.com> on 2012/05/30 17:40:33 UTC

Problem with write through proxy

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.


-- 
Joseph Isenberg
Senior Associate
WellDoc, Inc.

1501 St. Paul Street, Suite 118
Baltimore, MD 21202

T:  +1 443.692.3110
F:  +1 443.692.3099

www.welldoc.com <http://www.welldocinc.com/>

***This e-mail message is intended only for the named recipient(s)
above.  It may contain information that is confidential and/or
privileged.  If you are not the intended recipient, you must not keep,
use, disclose, copy or distribute this email without the author's
prior permission.  If you have received this e-mail in error, please
notify the sender immediately by return e-mail and delete this e-mail
and any attachment(s) from your system.***

Re: Problem with write through proxy

Posted by Stefan Podskubka <s....@hcs.at>.
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