[Web-SIG] Request and Response objects
Gregory (Grisha) Trubetskoy
grisha at modpython.org
Wed Nov 5 12:49:05 EST 2003
On Wed, 5 Nov 2003, Steve Holden wrote:
> But in mod_python a request had both headers_in and headers_out, so the
> confusion is less.
Yes, content_type is a special case in mod_python (see below)
> There's also err_headers_out, used only when an error occurs.
Actually, err_headers_out is *always* sent, headers_out is is sent *only
when there is no error*.
> For some reason Apache special-cases the Content-Type header.
This is because Apache has AddOutputFiltersByType, which activates certain
filters based on type. Because of this the content type can't just be set
in headers, but must set via a function call, which will add filters
For our purposes req.headers_out["content-type"] = "blah/blah" should be
More information about the Web-SIG