__browser_default__ does not let you easily return None

Bug #142365 reported by Andy McKay
2
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Low
Unassigned

Bug Description

Browser default lets you change the default page from index_html to something more flexible. However if the page you want to return does not exist, its hard to just ask the browser to return __call__ on the folder because: returning [None,] or ['',] makes an infinite loop and returning ['__call__,] is a security error and [getattr(content, '__call__'),] is not allowed in a Script (Python) (although it would be a Python Product.

The following patch just adds one more case that might be useful if you return [], then it goes and calls the default.

Im adding it here rather than checking it in, because this is not a hugely desirable or great thing and I found a workaround for the CMF. However I thought this might be useful to leave a paper trail.

Revision history for this message
Andy McKay (andy-agmweb) wrote :
Tres Seaver (tseaver)
Changed in zope2:
status: New → Triaged
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.