[mod_python] force download and content-disposition

Gregory (Grisha) Trubetskoy grisha at modpython.org
Fri May 30 19:12:44 EST 2003



On Fri, 30 May 2003, tohmas ash wrote:

> Before I use PHP for my web application, I know how do that in php
> it's like that:
> "
> header("Content-type: application/force-download");
> header("Content-Disposition: attachment; filename=$filename");

In mod_python it's:

req.headers_out["Content-type"] = "application/force-download"
req.headers_out["Content-Disposition"] = "attachment; filename=%s" % filename

Grisha



More information about the Mod_python mailing list