wanted to add to this thread:

after a lot of testing, I've noted that my 'cleanup' subscriber
solution only works if you RETURN the HTTPFound.
If you raise an HTTPFound, there's no way to catch the original
request object

it appears that event.request.response is overwritten with a new
instance of a response object when you RAISE a httpexception

I couldn't track down where it happened in the pyramid core, but
logging the object ids in a variety of test cases showed that this is
indeed happening.

These situations will work:
        return HTTPFound(location='/redirect-test-return-no-headers-
b')
        return HTTPFound(location='/redirect-test-return-specify-
headers-b',headers=headers_dict)
        raise HTTPFound(location='/redirect-test-raise-specify-headers-
b',headers=headers_dict)

This won't work
        raise HTTPFound(location='/redirect-test-raise-no-headers-b')

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to