Fixing COPY/MOVE when using Subversion behind a SSL reverse proxy

If you have a plain HTTP subversion apache instance sitting behind a SSL reverse proxy then the destination header required for COPY and MOVE operations will not be correct and will give the following error to the client:

Server sent unexpected return value (502 Bad Gateway) in response to COPY request for ...

The first step is to make sure that you are running apache version 2.2.4 or greater.

Next you will need to add the following config line to the subversion apache instance (not the proxy instance):

RequestHeader edit Destination ^https http early

Restart the subversion apache instance and test.

Last updated: 29/05/2011