Defect #5461

Cannot browse SVN Repositories with whitespaces in them

Added by Grant McEwan over 11 years ago. Updated over 11 years ago.

Status:ClosedStart date:2010-05-07
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:-
Resolution:Invalid Affected version:

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


Related issues

Related to Redmine - Defect #7505: Subversion: Repository URL with space not handled correctly Closed 2011-01-31
Related to Redmine - Defect #2532: Cannot browse Subversion paths that contain spaces Closed 2009-01-19

History

#1 Updated by Felix Schäfer over 11 years ago

  • Category changed from Issues to SCM

Change the whitespaces to %20 and see if that helps.

#2 Updated by Grant McEwan over 11 years ago

Doesn't seem to help? Any other information i can provide??

#3 Updated by Felix Schäfer over 11 years ago

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?

#4 Updated by Grant McEwan over 11 years ago

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?

#5 Updated by Felix Schäfer over 11 years ago

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/

#6 Updated by Grant McEwan over 11 years ago

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.

#7 Updated by Felix Schäfer over 11 years ago

Do you use a reverse proxy to server redmine?

#8 Updated by Grant McEwan over 11 years ago

Nope - i don't.

#9 Updated by Grant McEwan over 11 years ago

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?

#10 Updated by Grant McEwan over 11 years ago

Where abouts is the code that redmine uses to get the repository contents?

#11 Updated by Grant McEwan over 11 years ago

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.

#12 Updated by Felix Schäfer over 11 years ago

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.

#13 Updated by Grant McEwan over 11 years ago

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"}


#14 Updated by Grant McEwan over 11 years ago

  • 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.

#15 Updated by Felix Schäfer over 11 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Glad you got that worked out :-)

Also available in: Atom PDF