Defect #5461
closedCannot browse SVN Repositories with whitespaces in them
Added by Grant McEwan over 16 years ago. Updated over 16 years ago.
Description
Hi,
I get a proxy error when browsing through the projects repository that has a white space
eg .. a failed svn url would be "https://hostname/svn/project with whitespace/"
actual error message looks like
---
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /redmine/projects/<projectname>/repository/show/trunk/hardware/Main Board
Reason: Error reading from remote server
---
Is this just that i haven't changed my apache2 properly? or can this be fixed with apache2 at all? by what i see it's a case of redmine not escaping the URL's correctly?
I have just updated the version to 0.9.4 (2010-05-01) and rails version 2.3.5 apache2 version 2.2.9
Updated by Felix Schäfer over 16 years ago
Actions
#1
- Category changed from Issues to SCM
Change the whitespaces to %20 and see if that helps.
Updated by Grant McEwan over 16 years ago
Actions
#2
Doesn't seem to help? Any other information i can provide??
Updated by Felix Schäfer over 16 years ago
Actions
#3
Can you access https://hostname/svn/project with whitespace/ from your browser? Can you login to the server running redmine and see what svn ls https://hostname/svn/project with whitespace/ outputs, if possible as the user running redmine?
Updated by Grant McEwan over 16 years ago
Actions
#4
Hi Felix,
as the user running redmine ... i can see the result of svn ls https://hostname/svn/project%20name/
but i can't see svn ls https://hostname/svn/project name/
Does that mean my apache is incorrectly set?
Updated by Felix Schäfer over 16 years ago
Actions
#5
No, but URLs can't have blanks in them, they only get replaced by browsers with %20, which is a placeholder for blanks. Redmine should work with https://hostname/svn/project%20name/
Updated by Grant McEwan over 16 years ago
Actions
#6
hmm ok - well it doesn't? When i click on the repository tab and click through to the svn url with the whitespace in it, it directs me back to the proxy server error.
Updated by Felix Schäfer over 16 years ago
Actions
#7
Do you use a reverse proxy to server redmine?
Updated by Grant McEwan over 16 years ago
Actions
#8
Nope - i don't.
Updated by Grant McEwan over 16 years ago
Actions
#9
I've come to realize that i think the issue is with the "GET \ADDRESS\OF\URL" which is different to the address that is displayed in the browser window.
Is anyone else seeing this sort of issue?
Updated by Grant McEwan over 16 years ago
Actions
#10
Where abouts is the code that redmine uses to get the repository contents?
Updated by Grant McEwan over 16 years ago
Actions
#11
Given that i could do
svn ls https://hostname/svn/project%20name/
but not
svn ls https://hostname/svn/project name/
But i can do
svn ls "https://hostname/svn/project name/"
I turned on the debug output of redmine, tracing it back to
cmd = "#{SVN_BIN} list --xml #{target(URI.escape(path))}@#{identifier}" (in subversion adapter).
Not that i know what this is written in, but is it possible to pass the whole "#{target(URI.escape(path))}@#{identifier}" with the quote marks? SVN actually does all the decoding for us, so there's no need to escape it.
Updated by Felix Schäfer over 16 years ago
Actions
#12
The error you get is (or looks very much like) an apache reverse proxy error, we won't be able to help you without knowing what error caused that. If you have more information from the redmine logs, please post it here too.
Regarding the escaping of the URI: the URI.escape part should already format the blank to %20, which you state also works, so the problem is not there.
I just setup a test repository, and it works fine with https://some.url/svn/This%20is%20%20a%20test%20repo/ as well as https://some.url/svn/This is a test repo/ from my developments redmine. Please provide a way to reproduce, as this looks more and more like a problem with your setup rather than with redmine.
Updated by Grant McEwan over 16 years ago
Actions
#13
Hi Felix.
From the mongrel cluster log
----------------------
Tue May 11 11:16:00 +1200 2010: HTTP parse error, malformed request (127.0.0.1): #<Mongrel::HttpParserError: Invalid HTTP format, parsing fails.>
Tue May 11 11:16:00 +1200 2010: REQUEST DATA: "GET /redmine/projects/projecthardware/repository/show/hardware/Main Board HTTP/1.1\r\nHost: 127.0.0.1:8001\r\nUser-Agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.24 Version/10.53\r\nAccept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, /*;q=0.1\r\nAccept-Language: en-NZ,en;q=0.9\r\nAccept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1\r\nAccept-Encoding: deflate, gzip, x-gzip, identity, *;q=0\r\nReferer: http://server/redmine/projects/projecthardware/repository/show/hardware\r\nCookie: MOIN_SESSION_80_ROOT_4dwiki=4d84656c156d9e201ba9e9eea1676c918ee1c39b; _redmine_session=BAh7CDoPc2Vzc2lvbl9pZCIlZjkwNWIwZWU5YTQ3ZTQ2ZDZhN2NiZjRiMTMyNDAzOGE6DHVzZXJfaWRpCDoQX2NzcmZfdG9rZW4iMUJrNTZlMjRIWXJock5ZQVYxUzBSdVEzeTR2eUNtMzNJTXVqeGJkUTdSUGc9--db9e979ae39da17f14aa8864c1e4260c123d9639\r\nCookie2: $Version=1\r\nVia: 1.1 server\r\nX-Forwarded-For: 192.168.1.111\r\nX-Forwarded-Host: server\r\nX-Forwarded-Server: server\r\nConnection: Keep-Alive\r\n\r\n"
---
PARAMS: {"REQUEST_PATH"=>"/redmine/projects/projecthardware/repository/show/hardware/Main", "REQUEST_URI"=>"/redmine/projects/projecthardware/repository/show/hardware/Main", "REQUEST_METHOD"=>"GET"}
---
Tue May 11 11:16:01 +1200 2010: HTTP parse error, malformed request (127.0.0.1): #<Mongrel::HttpParserError: Invalid HTTP format, parsing fails.>
Tue May 11 11:16:01 +1200 2010: REQUEST DATA: "GET /redmine/projects/projecthardware/repository/show/hardware/Main Board HTTP/1.1\r\nHost: 127.0.0.1:8001\r\nUser-Agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.24 Version/10.53\r\nAccept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */;q=0.1\r\nAccept-Language: en-NZ,en;q=0.9\r\nAccept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1\r\nAccept-Encoding: deflate, gzip, x-gzip, identity, *;q=0\r\nReferer: http://server/redmine/projects/projecthardware/repository/show/hardware\r\nCookie: MOIN_SESSION_80_ROOT_4dwiki=4d84656c156d9e201ba9e9eea1676c918ee1c39b; _redmine_session=BAh7CDoPc2Vzc2lvbl9pZCIlZjkwNWIwZWU5YTQ3ZTQ2ZDZhN2NiZjRiMTMyNDAzOGE6DHVzZXJfaWRpCDoQX2NzcmZfdG9rZW4iMUJrNTZlMjRIWXJock5ZQVYxUzBSdVEzeTR2eUNtMzNJTXVqeGJkUTdSUGc9--db9e979ae39da17f14aa8864c1e4260c123d9639\r\nCookie2: $Version=1\r\nVia: 1.1 server\r\nX-Forwarded-For: 192.168.1.111\r\nX-Forwarded-Host: server\r\nX-Forwarded-Server: server\r\nConnection: Keep-Alive\r\n\r\n"
---
PARAMS: {"REQUEST_PATH"=>"/redmine/projects/projecthardware/repository/show/hardware/Main", "REQUEST_URI"=>"/redmine/projects/projecthardware/repository/show/hardware/Main", "REQUEST_METHOD"=>"GET"}
Updated by Grant McEwan over 16 years ago
Actions
#14
- Status changed from New to Resolved
Hi Felix,
Success!! It was a reverse proxy problem.
In my apache config i needed to add
...
ProxyPass /redmine balancer://redmine_cluster:8000/redmine
ProxyPassReverse / balancer://redmine_cluster:8000/redmine
...
Thank you for your help there.
Updated by Felix Schäfer over 16 years ago
Actions
#15
- Status changed from Resolved to Closed
- Resolution set to Invalid
Glad you got that worked out :-)