[mod_python] mod_python session trouble

Jim Gallacher jg.lists at sympatico.ca
Tue May 10 12:59:19 EDT 2005


Wouter van Marle wrote:
> Hi all,
> 
> Jim and Graham: thank you for your advices, it now seems to work well.
> The session is kept, even when calling functions in a different script,
> which is great.
> 
> The reading of my persistent cookie is fixed, a stupid bug/typo on my
> side (an always false statement so they would not get read, ever). Now
> when starting a new session, the starting values are read from the
> persistent cookie on the user's side, and this cookie is updated
> properly as well.
> 
> Currently I do not use the "return apache.OK", instead just a return, as
> "return apache.OK" results in an extra "0"(zero) at the end of the page!
> I don't think that's supposed to be like that. It looks a bit silly to
> me.

If you are using the publisher handler (or one of the other handlers 
included with mod_python), that handler calls your code and then returns 
apache.OK. If your function also returns apache.OK you get the extra "0" 
in the output to the browser. Generally you'll only want to return 
apache.OK if you are writing your own handler.

Regards,
Jim


More information about the Mod_python mailing list