Project

General

Profile

Actions

Defect #2532

closed

Cannot browse Subversion paths that contain spaces

Added by Frédéric Sagnes almost 16 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Category:
SCM
Target version:
-
Start date:
2009-01-19
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

Whenever I try to browse a subversion path that contains spaces, I get a 502 proxy error with the message "Error reading from remote server". In this case the SVN path was:
"http://grp-horus/bugs/repositories/browse/desktopmanager/trunk/applications/windows/resources%20status%20item"

I'm using redmine 0.8 on a mongrel 1.1.3 cluster with apache 2.2.8, subversion 1.5.1, MySQL 5.0.51a, ruby 1.8.6, rails 2.1.2.

The failing request log:

---
lun jan 19 10:12:02 +0100 2009: HTTP parse error, malformed request (127.0.0.1): #<Mongrel::HttpParserError: Invalid HTTP format, parsing fails.>
lun jan 19 10:12:02 +0100 2009: REQUEST DATA: "GET /bugs/repositories/browse/desktopmanager/trunk/applications/windows/resources status item HTTP/1.1\r\nHost: 127.0.0.1:8000\r\nUser-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nAccept-Encoding: gzip,deflate\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nReferer: http://grp-horus/bugs/repositories/show/desktopmanager\r\nCookie: wikidbUserID=25; wikidbUserName=Fsagnes; wikidbToken=6aae9084c698f5d766df2dfdb2aa4cbe; autologin=RFumjvGiU6zBtx2Sut0KUacYe7tV1ZBRwg3Gtiym; _session_id=5993d0605df86a9c26a102da1f4c8851\r\nVia: 1.1 grp-horus\r\nX-Forwarded-For: 192.168.8.142\r\nX-Forwarded-Host: grp-horus\r\nX-Forwarded-Server: grp-horus\r\nConnection: Keep-Alive\r\n\r\n"
---
PARAMS: {"REQUEST_PATH"=>"/bugs/repositories/browse/desktopmanager/trunk/applications/windows/resources", "REQUEST_URI"=>"/bugs/repositories/browse/desktopmanager/trunk/applications/windows/resources", "REQUEST_METHOD"=>"GET"}
---

The error page:
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /bugs/repositories/browse/desktopmanager/trunk/applications/windows/resources status item.

Reason: Error reading from remote server

Apache/2.2.8 (Ubuntu) DAV/2 SVN/1.5.1 mod_fastcgi/2.4.6 mod_jk/1.2.25 mod_python/3.3.1 Python/2.5.2 PHP/5.2.4-2ubuntu5.4 with Suhosin-Patch mod_ssl/2.2.8 OpenSSL/0.9.8g mod_perl/2.0.3 Perl/v5.8.8 Server at grp-horus Port 80


Files

browsing-dir-with-space.png (66 KB) browsing-dir-with-space.png Browsing a directory with spaces works Antonio García-Domínguez, 2009-04-21 11:40
browsing-subdir.png (91.5 KB) browsing-subdir.png Browsing a subdirectory from a directory with spaces does not work Antonio García-Domínguez, 2009-04-21 11:40
path_name_with_spaces.png (10.1 KB) path_name_with_spaces.png Go MAEDA, 2017-01-10 12:20

Related issues

Related to Redmine - Defect #5461: Cannot browse SVN Repositories with whitespaces in themClosed2010-05-07

Actions
Related to Redmine - Defect #7505: Subversion: Repository URL with space not handled correctlyClosed2011-01-31

Actions
Related to Redmine - Defect #17882: Subversion: French character filename causes error 404New

Actions
Actions #1

Updated by Jean-Philippe Lang almost 16 years ago

I'm not able to reproduce this error. Please provide the application log.

Actions #2

Updated by Antonio García-Domínguez over 15 years ago

We have also experienced this issue on our Redmine 0.7.9 installation. The exact issue seems to be browsing a subdirectory of a path that contains a space. For some reason, the URLs that are produced for these subdirectories are escaped by Redmine, containing "%20", which our browser (Mozilla Firefox 3.0.8, as packaged by Canonical in Ubuntu Intrepid 8.10) escapes once more to "%2520", which obviously does not exist.

The last two lines from the Mongrel log (translated from Spanish to English) are:

svn: The URL 'http://neptuno.uca.es/svn-private/sources-fm/src/Takuan%2520Plugin/src' does not exist in that revision
svn: The URL 'http://neptuno.uca.es/svn-private/sources-fm/src/Takuan%2520Plugin/src' does not exist in that revision

I have attached two more screenshots which I hope will clarify the problem.

I have looked around a bit and the issue seems to be (please correct me if I'm wrong) in the way "svn list" produces its entries, and how its output is parsed in source:trunk/lib/redmine/scm/adapters/subversion_adapter.rb. If I do this (supplying the required authentication credentials):

svn list --xml "http://neptuno.uca.es/svn/sources-fm/src/Takuan Plugin" 

I obtain the following output, which as you can see, contains the infamous "%20":

<?xml version="1.0"?>
<lists>
<list
   path="http://neptuno.uca.es/svn/sources-fm/src/Takuan%20Plugin">
<entry
   kind="file">
<name>build.xml</name>
<size>481</size>
<commit
   revision="445">
<author>alejandro</author>
<date>2009-04-21T08:32:21.243736Z</date>
</commit>
</entry>
<entry
   kind="file">
<name>manifest.mf</name>
<size>227</size>
<commit
   revision="445">
<author>alejandro</author>
<date>2009-04-21T08:32:21.243736Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>nbproject</name>
<commit
   revision="445">
<author>alejandro</author>
<date>2009-04-21T08:32:21.243736Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>src</name>
<commit
   revision="445">
<author>alejandro</author>
<date>2009-04-21T08:32:21.243736Z</date>
</commit>
</entry>
<entry
   kind="dir">
<name>test</name>
<commit
   revision="445">
<author>alejandro</author>
<date>2009-04-21T08:32:21.243736Z</date>
</commit>
</entry>
</list>
</lists>

Perhaps the URLs read from Subversion might need unescaping at some point before they're printed out?

Thanks in advance.

Actions #3

Updated by Grant McEwan over 15 years ago

Did anyone fix this? as i'm suffering the same problem.

Grant

Actions #4

Updated by Grant McEwan about 15 years ago

  • Assignee set to Jean-Philippe Lang

It appears this is still broken in 0.8.5?

Actions #5

Updated by Toshi MARUYAMA over 10 years ago

  • Related to Defect #17882: Subversion: French character filename causes error 404 added
Actions #6

Updated by Go MAEDA almost 8 years ago

No problem in the current trunk (r16171).

Actions

Also available in: Atom PDF