Serving a file through HTTP

Ian Bicking ianb at colorstudy.com
Tue Mar 18 21:10:24 EST 2003


On Tue, 2003-03-18 at 05:55, Gumuz wrote:
> I recently played with the HTTP & CGIHTTP servers.
> The're great fun and I see plenty of possibilities with them :)
> 
> I was wondering: how can I 'serve' a file through this server to a client,
> so the client(browser) will start a file-download(save-as,blabla)?

Maybe you already got it figured out, but if you do
set_header('Content-type', 'application/octet-stream') it should force a
save-as dialog.

  Ian







More information about the Python-list mailing list