502 Bad Gateway, in Response to SVN COPY with SSL off-loading

When accessing SVN over HTTPS, HTTPS can be terminated on Apache web server or it can be off-loaded to different software like Reverse Proxy. Problem is that HTTP-COPY request’s URI is changed to HTTP, but the “Destination:” header’s URI starts with HTTPS. When web server finds URI scheme of source and destination different, it throws an error 502 (Bad Gateway).