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
78c43c25
Commit
78c43c25
authored
Mar 24, 2006
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Collector #2037: fixed broken ACTUAL_URL for '/'
parent
0bd5545b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletion
+14
-1
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/Products/SiteAccess/VirtualHostMonster.py
lib/python/Products/SiteAccess/VirtualHostMonster.py
+1
-1
lib/python/Products/SiteAccess/tests/testVirtualHostMonster.py
...ython/Products/SiteAccess/tests/testVirtualHostMonster.py
+11
-0
No files found.
doc/CHANGES.txt
View file @
78c43c25
...
...
@@ -20,6 +20,8 @@ Zope Changes
- Missing import of NotFound in webdav.Resource.
- Collector #2037: fixed broken ACTUAL_URL for '/'
Zope 2.9.1 (2006/02/25)
Bugs fixed
...
...
lib/python/Products/SiteAccess/VirtualHostMonster.py
View file @
78c43c25
...
...
@@ -193,7 +193,7 @@ class VirtualHostMonster(Persistent, Item, Implicit):
request
[
'VIRTUAL_URL'
]
=
'/'
.
join
(
vup
)
# new ACTUAL_URL
add
=
request
[
'ACTUAL_URL'
].
endswith
(
'/'
)
and
'/'
or
''
add
=
(
path
and
request
[
'ACTUAL_URL'
].
endswith
(
'/'
)
)
and
'/'
or
''
request
[
'ACTUAL_URL'
]
=
request
[
'VIRTUAL_URL'
]
+
add
return
...
...
lib/python/Products/SiteAccess/tests/testVirtualHostMonster.py
View file @
78c43c25
...
...
@@ -59,6 +59,17 @@ class VHMRegressions(unittest.TestCase):
m
=
self
.
app
.
folder
.
doc
.
getPhysicalPath
self
.
assertEqual
(
m
(),
(
''
,
'folder'
,
'doc'
))
def
test_actual_url
(
self
):
self
.
app
.
folder
.
manage_addDTMLMethod
(
'index_html'
,
''
)
ob
=
self
.
traverse
(
'/VirtualHostBase/http/www.mysite.com:80/folder/VirtualHostRoot/doc/'
)
self
.
assertEqual
(
self
.
app
.
REQUEST
[
'ACTUAL_URL'
],
'http://www.mysite.com/doc/'
)
ob
=
self
.
traverse
(
'/VirtualHostBase/http/www.mysite.com:80/folder/VirtualHostRoot/doc'
)
self
.
assertEqual
(
self
.
app
.
REQUEST
[
'ACTUAL_URL'
],
'http://www.mysite.com/doc'
)
ob
=
self
.
traverse
(
'/VirtualHostBase/http/www.mysite.com:80/folder/VirtualHostRoot/'
)
self
.
assertEqual
(
self
.
app
.
REQUEST
[
'ACTUAL_URL'
],
'http://www.mysite.com/'
)
ob
=
self
.
traverse
(
'/VirtualHostBase/http/www.mysite.com:80/folder/VirtualHostRoot'
)
self
.
assertEqual
(
self
.
app
.
REQUEST
[
'ACTUAL_URL'
],
'http://www.mysite.com/'
)
def
gen_cases
():
for
vbase
,
ubase
in
(
(
''
,
'http://foo'
),
...
...
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