This was driving me crazy for a while.  Finally i realized that
Pyramid doesn't send any SetCookie commands when a redirect is called,
because the HTTPFound is oblivious to the request.

It's not entirely recommended to set cookies with a redirect as not
all browsers accept them ( only Safari doesn't ) , however it is
common practice to encounter it... and I have some legacy code to
maintain / transition.

I ended up with a workaround :
        headers [ (k,v) for (k,v) in
self.request.response.headers.iteritems() if k == 'Set-Cookie']
        return HTTPFound(location='/account/redirect-
test-2',headers=headers)

Does anyone know why "requests" were omitted from the
httpexceptions ?  I just find it odd that there isn't a 'request' arg
on them , and that something like this isn't automatic.

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

Reply via email to