[mod_python] apache.OK and Cookies

David Bear David.Bear at asu.edu
Mon May 22 16:10:43 EDT 2006

On Sun, May 21, 2006 at 06:49:30PM -0400, Graham Dumpleton wrote:
> Graham Dumpleton wrote ..
> > jaba at findyourcore.com wrote ..
> > > I have two questions:
> > > 1. is 'return apache.OK' really needed? ive gone without it many times,
> > > and nothing goes wrong.
> > 
> > What version of mod_python are you using?
> > 
> > Can you clarify whether you are using your own handler, where it would
> > should be used, or whether you are using mod_python.publisher where it
> > would not, but if it was may simply result in a extraneous "0" at end of
> > output that may get overlooked.
> > 
> > In summary, if using your own handler, you should always return it. If
> > you don't, you should at least see a warning message in the Apache log
> > files and the results may be unpredictable as to how Apache treats the
> > result.
> Actually, as well as the error in the log file, mod_python should end up
> sending an internal server error (500) response back to Apache. If you
> aren't seeing this, then I would suspect you aren't writing your own
> handler and are using some layer on top where the result may not even be
> a status code, or where status codes are treated differently. For
> example, in mod_python.publisher, the result is converted to a string
> and append to the content. In Vampire, if nothing is returning it is
> equivalent to having returned apache.OK.
> Thus, thus make sure you indicate what handler you are using as well as
> the version of mod_python.

this caused me to think, what happens when a publisher script returns
a psp file? using the example from the mod_python.org web site, all
the functions that are used to 'dispatch' different pages return the
psp file. Does that implicitly then return apache.OK to apache? or is
there something else that need to be done to keep apache happy?

> Graham
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

David Bear
phone: 	480-965-8257
fax: 	480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 "Beware the IP portfolio, everyone will be suspect of trespassing"

More information about the Mod_python mailing list