cgi script headers - help
Ajay
abra9823 at mail.usyd.edu.au
Wed Aug 4 22:58:24 EDT 2004
nope that doesn't make a difference.
php does it easily through header(), java does it through addHeader, why or
how does Python do it?
--
Ajay Brar,
CS Honours 2004
Smart Internet Technology Research Group
Quoting Rowdy <david at fielden.com.au>:
> Ajay wrote:
>
> > hi!
> >
> > i am generating a file on the fly and making a user download it.
> > print "Content-Type: application/model\n\n"
> > print "Content-Disposition: attachment; filename=modeldef3\n"
> > print str
> >
> > i set the Content-Disposition to force a download dialog box and also
> give
> > the file a name.
> > however when i view the headers sent by my script, i have only
> > HTTP/1.1 200 OK
> > Date: Thu, 05 Aug 2004 02:26:48 GMT
> > Server: Apache/1.3.19 (Unix)
> > Connection: close
> > Content-Type: application/model
> >
> > why isn't the Content-Disposition header coming up?
> >
> > thanks
> >
> > cheers
> >
> > --
> > Ajay Brar,
> > CS Honours 2004
> > Smart Internet Technology Research Group
>
> One guess would be the double \n at the end of the Content-Type line -
> try removing one and see if that works.
>
> Rowdy
>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Python-list
mailing list