Commit 6d4692ac authored by Roque's avatar Roque

erp5_web: fix bug in static section redirection

- check url symbols when dropping VirtualHostMonster elements in url
parent 06f9708e
......@@ -37,6 +37,8 @@ from Products.ERP5Type import Permissions
from webdav.NullResource import NullResource
import urllib
MARKER = []
class StaticWebSection(WebSection):
......@@ -67,7 +69,7 @@ class StaticWebSection(WebSection):
# Drop the automatically added VirtualHostMonster object ID
virtual_url_part_tuple = request.get('VIRTUAL_URL_PARTS', None)
if (virtual_url_part_tuple is not None) and \
(not virtual_url_part_tuple[1].endswith("/".join(url_list))):
(not urllib.unquote(virtual_url_part_tuple[1]).endswith("/".join(url_list))):
url_list.pop(0)
if request.get('ACTUAL_URL', '').endswith("/"): # or len(url_list) == 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment