[Zope] Question about the default view of a ZClass named index_html
Dieter Maurer
dieter@handshake.de
Mon, 13 Aug 2001 20:49:48 +0200 (CEST)
Michiel Toneman writes:
> ...
> If I call it index_html, the following URLs get me a zero sized reply of
> mime-type text/x-unknown-content-type.
>
> http://server/MyFolder/
> http://server/MyFolder/index_html
>
> However, I can use the object as
>
> http://server/MyFolder/index_html/index_html
This is an effect of the following ZPublisher code
(from "ZPublisher.BaseRequest.BaseRequest.traverse"):
# Check for method:
if path:
entry_name = path.pop()
elif (method and hasattr(object,method)
and entry_name != method
and getattr(object, method) is not None):
request._hacked_path=1
entry_name = method
It explicitely checks for "entry_name != method".
This probably has the purpose to avoid infinite loops.
In your case, "method" is "index_html".
Dieter