mod_python and Content-Type

Paul Rudin paul.rudin at
Sat Jan 13 10:49:10 CET 2007

I'm have a little experiment with mod_python. I'm trying to figure out
how to get hold of the original Content-Type header. 

In my config file I have:

<Directory /var/www/test/atom>
      AddHandler mod_python .py
      PythonHandler atomserv
      PythonDebug On
	    PythonAutoReload On

The file in that directory has a function called handler
that gets called as I expect, but on entry to that function
req.content_type is "text/x-python" whereas my test client sent a
different Content-Type header.

So, how can I either persuade the apache/mod_python machinery to
preserve the original content_type, or else how can I get hold of it?

More information about the Python-list mailing list