[mod_python] Sendfile & request answer

Graham Dumpleton graham.dumpleton at gmail.com
Thu Apr 24 07:22:08 EDT 2008

2008/4/24  <Dominique.Holzwarth at ch.delarue.com>:
> Hi everyone!
>  I'm using the publisher handler for a web application that consist of a html page with a form. On a button click I'm sending a file to the client (so the client can open/save that file). But when I do the req.sendfile() I can't send a 'normal' request answer (a html page) to the client anymore using 'return "some html string"' or 'req.write("html string")'.
>  Is there any way to send a file to the user AND refresh the displayed html page?

Within the one response, no.

At least this is the case if using req.sendfile(). The only way would
be by sending a multipart/mixed response, but then you would most
likely need a special client to be able to pull it apart which would
generally make it impractical.


More information about the Mod_python mailing list