[mod_python] Session Cookie Name

Graham Dumpleton grahamd at dscpl.com.au
Thu Oct 6 08:02:21 EDT 2005

On 06/10/2005, at 9:44 PM, Robert Wallner wrote:

> On 10/6/05, Graham Dumpleton <grahamd at dscpl.com.au> wrote:
>> Can't check source code at the moment, but If this is changing
>> the global cookie name it would be a dangerous thing to do
>> from within an actual handler.
>  Of course, I forgot to mention that. I am changing the cookie
> name at the top of the module containging the handler function.

If you mean at global scope within the module, ie., it would only be
done at time of import of the handler module, would still be potentially
dangerous as requests could arrive for other handlers before your
handler is imported. When I said "handler" I meant anywhere in the
handler module, not just the handler function.

I'll agree that it will not be a problem if your handler is the only
handler defined for that interpreter instance, but if you are running
multiple handlers of your own or sharing with others, the only reliable
way of doing this, if you really want to do it this way, is to do it
from a module imported using PythonImport before any requests are


More information about the Mod_python mailing list