Hello,
I posted a question on stackoverflow about the right way to manage
cookies browser support. I need your help guys..

""""
Hello!

I would like to know when is the right moment and how to check the
browser cookies support.

I understand I have to check the next request and for instance, with
beaker, looking for the session key "_creation_time" or
request.headers['Cookie']..and raise an exception if not found but I
don't want to do that or something similar for every request. Some
parts of my application don't require cookies..like the home page or
info, faq page...

When a user logout..the session get deleted or invalidated and I used
to redirect to the home view, if I check the "session key" in this
moment, I'll not found it but it doesn't mean there is this issue.

An example I used at the beginning of login view:

 try: request.headers['Cookie']
 except KeyError:
   return HTTPFound(location=request.route_url('home'))

Please also note that if I try to print an error message using
request.session.flash(msg, 'error') or use the snippet again at the
beginning of the home view and render a message with the template
using a control return variable, after logout it will be erroneous
displayed.

I am looking for the most elegant way to resolve issue...maybe
subscribe to a event?...write down a function to call in some
interested view?

Thank you for your time in advance, excuse my poor English.

f.
"""

Thank you for your time in advance.
f.

-- 
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