on the fly document generation

Michael Hudson mwh at python.net
Thu Aug 5 14:11:41 CEST 2004


Ajay <abra9823 at mail.usyd.edu.au> writes:

> hi!
> 
> i generate a document on the fly and then print it from my script. to force
> the browser to show the 'save file' dialog rather than display the content
> in  the browser, i have added the header Content-Type
> print "Content-Type: application\n"
> however when the save file dialog box comes up, it gives the script name
> (in this case sfile.cgi) as the filename. how can i change that to a
> different filename?
> 
> print "Content-Type: application; name="test.xml\n"

I think it's Content-Disposition: you're after.  ISTR it has some
insane format I can't remember.

> sorry its a little off-topic

I'd say!

Cheers,
mwh

-- 
  Enlightenment is probably antithetical to impatience.
                                        -- Erik Naggum, comp.lang.lisp



More information about the Python-list mailing list