Commit bb817cc3 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Eteri

erp5_web: Fix Static Web Section URL resolution

parent b3f62a10
......@@ -54,14 +54,18 @@ class StaticWebSection(WebSection):
if isinstance(name, list):
name = name[0]
if not name or name in ("/",):
url_list = []
else:
url_list = [name]
while len(stack):
if stack[-1] not in ('/', ''):
url_list.append(stack.pop())
if request.get('ACTUAL_URL', '').endswith("/"):
else:
stack.pop()
if request.get('ACTUAL_URL', '').endswith("/"): # or len(url_list) == 0:
url_list.append("index.html")
self.log("/".join(url_list))
return DocumentExtensibleTraversableMixin.getExtensibleContent(self, request, "/".join(url_list))
def _getStaticDocument(self, request, name):
......
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