Bug #5521
openProxing SVN http requests does not work when using prefix for rhodecode.
0%
Description
Dear rhodecode,
When setting the prefix for rhodecode in rhodecode.ini svn http proxing does not work.
Our rhodecode server is accessed by http://kvmech.kverneland.com/rhodecode through a reverse proxy. Prefix /rhodecode is used to make this work.
On the same server apache is running with mod_dav svn accessible by "http://localhost:8090".
I tried two methodes to make it work:
1.
Set "svn.proxy.location_root = /rhodecode" in rhodecode.ini to make svn repos available on "http://localhost:8090/rhodecode/reponame"
Set the "Subversion HTTP Server URL" to "http://localhost:8090/rhodecode" (or "http://localhost:8090/rhodecode/") to proxy the requests to the correct url.
This does not work since the "/rhodecode" on the "Subversion HTTP Server URL" is ignored and requests are forwarded to "http://localhost:8090/reponame" instead of "http://localhost:8090/rhodecode/reponame"
Svn error mentions invalid XML returned. Rhodecode log shows a connection error to the SVN server.
2.
Set "svn.proxy.location_root = /" in rhodecode.ini to make svn repos available on "http://localhost:8090/reponame"
Set the "Subversion HTTP Server URL" to "http://localhost:8090" to proxy the requests to the correct url.
This does not work. svn error is received telling "kvmech.kverneland.com/reponame" is not the same repo as "kvmech.kverneland.com/rhodecode/reponame"
In both cases the svn server can be accessed directly by "http://localhost:8090/rhodecode" or "http://localhost:8090".
The current work around is to change simplesvn.py:
From:
def _get_url(self, path):
url_path = urlparse.urljoin(
self.config.get('subversion_http_server_url', ''), path)
url_path = urllib.quote(url_path, safe="/:=~+!$,;'")
return url_path
To:
def _get_url(self, path):
url_path = urlparse.urljoin(
self.config.get('subversion_http_server_url', ''), '/rhodecode' + path)
#self.config.get('subversion_http_server_url', ''), path)
url_path = urllib.quote(url_path, safe="/:=~+!$,;'")
return url_path
I got to this workaround with the help of admin on the rhodecode slack channel. Is there a better solution for this?