[Zope] Re: http header question
Robert Casties
casties at mpiwg-berlin.mpg.de
Wed Jan 19 14:27:33 EST 2005
Nathaniel Wingfield wrote:
> My header looks like this:
>
>
>
> HTTP/1.1 200 OK
>
> Server: Zope/(Zope 2.7.3-0, python 2.3.4, linux2) ZServer/1.1
>
> Date: Wed, 19 Jan 2005 17:08:30 GMT
>
> Content-Length: 20004
>
> Content-Type: application/pdf
>
> Connection: close
>
> Content-Disposition: filename="attachment.pdf"
What do you want it to do?
If you want the browser to display the file as PDF i.e. use a plugin if
it has a plugin, then you should keep the Content-Type application/pdf
and omit the Content-Disposition.
If you want the browser to treat the file as unknown i.e. display a
download box, then you should change the Content-Type to
application/octet-stream and the Content-Disposition to
Content-Disposition: attachment; filename="attachment.pdf"
At least that works for me.
Robert
More information about the Zope
mailing list