Commit 70122fa8 authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_web: Fix StaticWebSection support for VirtualHostMonster.

There are 2 shemes for VIRTUAL_URL_PARTS:
- 2-tuple with SERVER_URL and subpath
- 3-tuple with SERVER_URL, vh path and subpath
This code only supported the 2-tuple version, add support for the 3-tuple
version.
parent 0a7dd545
Pipeline #8154 failed with stage
in 0 seconds
......@@ -69,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 urllib.unquote(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