[mod_python] apache.OK and Cookies

jaba at findyourcore.com jaba at findyourcore.com
Tue May 23 12:27:43 EDT 2006

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

i am using ny own handler, so i guess i'll just put apache.OK at the end,

More information about the Mod_python mailing list