[mod_python] set cookie in auth stage?

Bud P. Bruegger bud at comune.grosseto.it
Thu Feb 5 19:15:35 EST 2004


Hello everyone,

I'm new to modpython and hope to not ask an overly stupid question.

Is it possible with modpython (apache) to set a cookie at the authentiction 
stage while a later stage interfaces to some kind of "application servers" 
(j2ee, cgi, fcgi, modpython PythonHandler, etc.) that create the actual 
response?

The danger I see is that the cookie, being part of the response header, may 
be overwritten by the application server.  If this is the case, should I 
prepare the cookie data in the authentication handler and communicate it to 
a handler that runs after the response is created by the application 
server.  The manual states that "You can dynamically assign attributes to 
[the request object] as a way to communicate between handlers".   Is this 
the mechanism that I could use to communicate the cookie data?  If so, does 
anyone have an example for such communications?  And also, what stage would 
I use to actually set the cookie (is the cleanup handler a good choice?).

Many thanks for any help

-bud



-------------------------------------------------------------------------------------------------
Ing. Bud P. Bruegger, Ph.D.                 bud at comune.grosseto.it
Servizio Elaborazione Dati                    0564-488 577 (voice)
Comune di Grosseto                            0564- 21139 (fax)
Via Ginori, 43
58100 Grosseto

Collaborazione Open Source per la CIE http://www.comune.grosseto.it/cie/ 



More information about the Mod_python mailing list