[Zope-Coders] [ZC] 121/ 2 Comment "ZClass "not defined" instead of "Unauthorized" when Authorization header missing"
Collector: Zope Bugs and Patches ...
zope-coders@zope.org
Wed, 16 Jan 2002 09:16:33 -0500
Issue #121 Update (Comment) "ZClass "not defined" instead of "Unauthorized" when Authorization header missing"
Status Pending, Zope/bug medium
To followup, visit:
http://collector.zope.org/Zope/121
==============================================================
= Comment - Entry #2 by zigg on Jan 16, 2002 9:16 am
See also http://bugzilla.mozilla.org/show_bug.cgi?id=110705, which explains why this can cause problems with Mozilla. Mozilla doesn't currently have the behavior in that bug (that I can see today, at least), but it has from time to time.
________________________________________
= Request - Entry #1 by zigg on Jan 4, 2002 2:54 pm
If you try to invoke a ZClass constructor (i.e.
GET /WfTest/manage_addProduct/WorkflowTest/WorkflowItem_factory/WorkflowItem_add?id=w00t HTTP/1.1
) without sending an Authorization header, there seems to be something in guarded_getitem that NameErrors instead of Unauthorizes.
Traceback:
File /export/home/b14741/Zope_Dev/lib/python/ZPublisher/Publish.py, line 223, in publish_module
File /export/home/b14741/Zope_Dev/lib/python/ZPublisher/Publish.py, line 187, in publish
File /export/home/b14741/Zope_Dev/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook
(Object: WorkflowItem_factory)
File /export/home/b14741/Zope_Dev/lib/python/ZPublisher/Publish.py, line 171, in publish
File /export/home/b14741/Zope_Dev/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: WorkflowItem_add)
File /export/home/b14741/Zope_Dev/lib/python/ZPublisher/Publish.py, line 112, in call_object
(Object: WorkflowItem_add)
File /export/home/b14741/Zope_Dev/lib/python/OFS/DTMLMethod.py, line 199, in __call__
(Object: WorkflowItem_add)
File /export/home/b14741/Zope_Dev/lib/python/DocumentTemplate/DT_String.py, line 546, in __call__
(Object: WorkflowItem_add)
File /export/home/b14741/Zope_Dev/lib/python/DocumentTemplate/DT_With.py, line 133, in render
(Object: WorkflowItem.createInObjectManager(REQUEST['id'], REQUEST))
File /export/home/b14741/Zope_Dev/lib/python/DocumentTemplate/DT_Util.py, line 231, in eval
(Object: WorkflowItem.createInObjectManager(REQUEST['id'], REQUEST))
(Info: REQUEST)
File <string>, line 2, in f
(Object: guarded_getitem)
NameError: global name 'WorkflowItem' is not defined
This is a problem because 503 is being returned to the browser instead of 401, and authorization is not prompted for.
==============================================================