Re: [Zope-dev] Unauthorized handling in Zope2

2010-04-21 Thread yuppie
Hi! Wichert Akkerman wrote: Unauthorised is doing stupid things here: (Pdb) p v Unauthorized() (Pdb) p unicode(v) u'' (Pdb) p str(v) *** UnicodeEncodeError: UnicodeEncodeError('ascii', u'!DOCTYPE html...', 1175, 1176, 'ordinal not in range(128)') I added an extra change (see

Re: [Zope-dev] Unauthorized handling in Zope2

2010-04-20 Thread yuppie
Hi! Wichert Akkerman wrote: v is the html as generated by my view. Reraising the exception transfers control to the bare except in ZPublisher.Publish.publish_module_standard, which generates the standard site error page and returns that. Could it be that your v is unicode? Please let me

Re: [Zope-dev] Unauthorized handling in Zope2

2010-04-20 Thread Wichert Akkerman
On 4/20/10 09:51 , yuppie wrote: Hi! Wichert Akkerman wrote: v is the html as generated by my view. Reraising the exception transfers control to the bare except in ZPublisher.Publish.publish_module_standard, which generates the standard site error page and returns that. Could it be that

Re: [Zope-dev] Unauthorized handling in Zope2

2010-04-20 Thread Wichert Akkerman
On 4/20/10 09:51 , yuppie wrote: Hi! Wichert Akkerman wrote: v is the html as generated by my view. Reraising the exception transfers control to the bare except in ZPublisher.Publish.publish_module_standard, which generates the standard site error page and returns that. Could it be that

Re: [Zope-dev] Unauthorized handling in Zope2

2010-04-20 Thread yuppie
Hi! Wichert Akkerman wrote: Unauthorised is doing stupid things here: (Pdb) p v Unauthorized() (Pdb) p unicode(v) u'' (Pdb) p str(v) *** UnicodeEncodeError: UnicodeEncodeError('ascii', u'!DOCTYPE html...', 1175, 1176, 'ordinal not in range(128)') I added an extra change (see

Re: [Zope-dev] Unauthorized handling in Zope2

2010-04-20 Thread Wichert Akkerman
On 4/20/10 15:17 , yuppie wrote: Hi! Wichert Akkerman wrote: Unauthorised is doing stupid things here: (Pdb) p v Unauthorized() (Pdb) p unicode(v) u'' (Pdb) p str(v) *** UnicodeEncodeError: UnicodeEncodeError('ascii', u'!DOCTYPE html...', 1175, 1176, 'ordinal not in

Re: [Zope-dev] Unauthorized handling in Zope2

2010-04-20 Thread yuppie
Hi! Wichert Akkerman wrote: On 4/20/10 15:17 , yuppie wrote: Wichert Akkerman wrote: I added an extra change (see diff below) to fix that, after which things seemed to work. Great! Can you commit that change along with your other changes? Yes. I'll write some more tests and commit it in

[Zope-dev] Unauthorized handling in Zope2

2010-04-19 Thread Wichert Akkerman
I can't get an Unauthorized exception view to work with current Zope 2.12 svn. My approach was: - add a dummy PAS challenge plugin which does nothing, effectively delegating everything to my Unauthorized exception view - register a browser view for Unauthorized and return a proper error

Re: [Zope-dev] Unauthorized handling in Zope2

2010-04-19 Thread yuppie
Hi! Wichert Akkerman wrote: I can't get an Unauthorized exception view to work with current Zope 2.12 svn. My approach was: - add a dummy PAS challenge plugin which does nothing, effectively delegating everything to my Unauthorized exception view - register a browser view for

Re: [Zope-dev] Unauthorized handling in Zope2

2010-04-19 Thread yuppie
Hi again! yuppie wrote: Wichert Akkerman wrote: v is the html as generated by my view. Reraising the exception transfers control to the bare except in ZPublisher.Publish.publish_module_standard, which generates the standard site error page and returns that. I would have expected that