Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#2864 closed defect (fixed)

Cannot browse source with space in path name

Reported by: Graham Booker Owned by: Christian Boos
Priority: normal Milestone: 0.10
Component: web frontend/mod_python Version: devel
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When browsing source, upon clicking on a directory contain a space in its name, trac cannot find the file/directory. This is against [3008]

Example: http://trac.fireim.org/dev/browser/trunk/fire/

Click on any of the directories with a space in the name, such as "Preference Panes"

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 19 years ago

Milestone: 0.10
Owner: changed from Jonas Borgström to Christian Boos
Status: newassigned

Can you try this fix?

  • trac/web/main.py

     
    2020import os
    2121import sys
    2222import dircache
     23import urllib
    2324
    2425from trac.core import *
    2526from trac.env import open_environment
     
    209210                raise ValueError('TracUriRoot set to %s but request URL '
    210211                                 'is %s' % (root_uri, request_uri))
    211212            environ['SCRIPT_NAME'] = root_uri
    212             environ['PATH_INFO'] = request_uri[len(root_uri):]
     213            environ['PATH_INFO'] = urllib.unquote(request_uri[len(root_uri):])
    213214
    214215    else:
    215216        environ.setdefault('trac.env_path', os.getenv('TRAC_ENV'))

comment:2 by Christopher Lenz, 19 years ago

What front-end are you using?

comment:3 by Christian Boos, 19 years ago

#2865 was marked as duplicate. For the reporter, the above fix did work.

Should we commit this?

comment:4 by bdash, 19 years ago

I can confirm that this fix resolves the issue.

comment:5 by Christopher Lenz, 19 years ago

Yeah, this looks okay.

comment:6 by Christian Boos, 19 years ago

Component: browsermod_python frontend
Resolution: fixed
Status: assignedclosed

Ok, fix applied in r3098.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.