[Zope-dev] Unauthorized handling in Zope2

yuppie y.2010 at wcm-solutions.de
Wed Apr 21 05:03:25 EDT 2010


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 diff below) to fix that, after which things
> seemed to work.

Looks like my patch didn't work for you because of this:
http://bugs.python.org/issue6108 (fixed in Python 2.6.5)

I committed a modified Unauthorized patch that should work with all 
supported Python versions:
http://svn.zope.org/?rev=111197&view=rev

And I hope together with the change in HTTPResponse your issue is 
resolved now:
http://svn.zope.org/?rev=111199&view=rev


Cheers,

	Yuppie


More information about the Zope-Dev mailing list