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?
Updated by Marcin Kuzminski [CTO] almost 6 years ago
- Status changed from New to In Progress
- Target version set to v4.15
Thanks for reporting that, we'll add a fix to the next stable bugfix release.
Updated by Redmine Integration over 5 years ago
- Status changed from In Progress to Resolved
Commit 1fb993c1ee05
by Marcin Kuzminski marcin@rhodecode.com on stable
branch changed this issue.
https://code.rhodecode.com/rhodecode-enterprise-ce/changeset/1fb993c1ee05d54a9a3b25ca0ac6708588824537