[mod_python] User request cancellation

Graham Dumpleton graham.dumpleton at gmail.com
Wed Nov 12 00:10:50 EST 2008

2008/11/12 Poletto Guillaume <polettog at gmail.com>:
> Hi there,
> I was just wondering : what happens when the user interrupts his request (by hitting the "stop" button in his browser for example)?
> Does the execution continues until the end or is there an exception like when we do Ctrl+C in python interactive mode?


If the handler was still in the process of waiting for request input,
a Python IOError exception would likely occur when connection broken
off. How this affects application would depend on how code written,
but if not caught would cause handler to exit and generate a 500

If not reading any input, handler would continue to run. If it returns
all response content in one go, would then return per normal. If it
sends response in bits and flushes after each, then likely an IOError
would occur after connection had been broken.


More information about the Mod_python mailing list