Re: [Paste] Beaker broken with WebOb's HTTPFound

Top Page
Author: Ben Bangert
Date:  
To: Ian Bicking
CC: Nick Murphy, paste-users, pylons-discuss
Subject: Re: [Paste] Beaker broken with WebOb's HTTPFound
On Feb 17, 2008, at 9:19 AM, Ian Bicking wrote:

> This should be fixed in Beaker I think. Ben?
>
> Nick Murphy wrote:
>> Hi All,
>> I stumbled upon a bug in Beaker when raising webob.exc.HTTPFound.
>> The
>> offending line in Beaker is middleware.py:155. It's caused because
>> the
>> header attribute of a WebOb WSGIHTTPException is a MultiDict (by
>> way of


Hmm, nope, its just checking to see if the app call results in an
exception that is called 'HTTPFound'. It has no further checks to
disambiguate a webob HTTPFound from any other, which it really should
as well since its possible other WSGI components underneath might
raise a 'HTTPFound'.

Nick, if you'd like to take a stab at a patch, the solution I'd go for
is to further test the HTTPFound object to determine if its from
webob, or from paste, and use the appropriate header insertion
technique.

Alternatively, I could remove that entirely, and have the (fairly
reasonable) expectation that Beaker shouldn't be responsible for
messing with app exceptions, and the HTTPFound exception should've
been caught earlier and turned into a proper WSGI response...

Cheers,
Ben_______________________________________________
Paste-users mailing list
Paste-users@???
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users