[mod_python] Apache Status-Code and headers

Lars Eriksen downgrade at gmx.org
Wed Feb 15 07:05:27 EST 2006

The manual says:

*set_content_length*( 	len)

Sets the value of req.clength and the "Content-Length" header to len. 
Note that after the headers have been sent out (which happens just 
before the first byte of the body is written, i.e. first call to 
req.write()), calling the method is meaningless.

Now how can returning the status code, e.g. apache.OK, after you call 
req.write(...), have any effect if the headers have already been sent out?

More information about the Mod_python mailing list