Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
d96eb230
Commit
d96eb230
authored
Sep 27, 2002
by
Martijn Pieters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix setVirtualRoot in the face of unicode paths (such as occur during an
XML-RPC request.
parent
6fc1aa9f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
lib/python/ZPublisher/HTTPRequest.py
lib/python/ZPublisher/HTTPRequest.py
+4
-3
No files found.
lib/python/ZPublisher/HTTPRequest.py
View file @
d96eb230
...
...
@@ -11,9 +11,10 @@
#
##############################################################################
__version__
=
'$Revision: 1.8
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.8
3
$'
[
11
:
-
2
]
import
re
,
sys
,
os
,
urllib
,
time
,
random
,
cgi
,
codecs
from
types
import
StringType
,
UnicodeType
from
BaseRequest
import
BaseRequest
from
HTTPResponse
import
HTTPResponse
from
cgi
import
FieldStorage
,
escape
...
...
@@ -162,8 +163,8 @@ class HTTPRequest(BaseRequest):
def
setVirtualRoot
(
self
,
path
,
hard
=
0
):
""" Treat the current publishing object as a VirtualRoot """
other
=
self
.
other
if
type
(
path
)
is
type
(
''
):
path
=
path
.
split
(
'/'
)
if
isinstance
(
path
,
StringType
)
or
isinstance
(
path
,
UnicodeType
):
path
=
path
.
split
(
'/'
)
self
.
_script
[:]
=
map
(
quote
,
filter
(
None
,
path
))
del
self
.
_steps
[:]
parents
=
other
[
'PARENTS'
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment