[mod_python] mod_python test

Graham Dumpleton grahamd at dscpl.com.au
Wed Feb 23 22:38:01 EST 2005

Do you mean that FireFox gives you a SaveAs dialog to save response to disk?

If it is, make sure you set the content type in the response as I gave in the
modified handler code I sent:

from mod_python import apache
def handler(req):
        req.content_type = "text/plain"
        req.write("Hello World!")
        return apache.OK

If you don't set the content type, FireFox will look at the .py extension to work
out what to do and when it can't work it out, will use SaveAs.

Ales Zemene wrote ..
> it works.
> still strange if i hit link hello.py in dir, it tries to download, have
> to type it in address bar, sometimes even that helps not. maybe problem
> of firefox.
> in links it works.
> thanks
> citation of <grahamd at dscpl.com.au> from Wed, Feb 23, 2005 at 08:35:52PM
> -0500, Graham Dumpleton :
> > You are using 2.7.10 but appear to be following 3.1.3 documentation.
> > Use the correct documentation, it will not work otherwise.
> doc is Release 2.7.8 did not find 10
> ales

More information about the Mod_python mailing list