[thelist] HTTP headers for PDF files and IE

Bill Moseley moseley at hank.org
Fri Oct 13 18:53:13 CDT 2006

I'm missing something obvious here about downloading a PDF file.

For a dynamically generated PDF I set these headers:

    Content-Type: application/pdf
    Content-Disposition: attachment; filename=pdf1.pdf

This works fine in Safari, Opera, FF, lynx, w3m but not in IE.

IE reports:

    The requested site is either unavailable or cannot be found.

Here's the full headers:

$ HEAD http://infopeople.org/pdf1
200 OK
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: close
Date: Fri, 13 Oct 2006 23:00:21 GMT
Pragma: no-cache
Via: 1.1 infopeople.org
Server: Apache/2.0.54 (Debian GNU/Linux) mod_perl/2.0.2 Perl/v5.8.4
Content-Length: 100504
Content-Type: application/pdf
Client-Date: Fri, 13 Oct 2006 23:00:21 GMT
Client-Response-Num: 1
Content-Disposition: attachment; filename=pdf1.pdf
Set-Cookie: ws2_session=d85a081082fb023f3faae02f427f9a01777f415d; domain=.infopeople.org; path=/

And I have other header combinations at these locations:

$ HEAD http://infopeople.org/pdf2 | egrep '(Type|Disp)'
Content-Type: application/pdf

$ HEAD http://infopeople.org/pdf3 | egrep '(Type|Disp)'
Content-Type: application/x-download

$ HEAD http://infopeople.org/pdf4 | egrep '(Type|Disp)'
Content-Type: application/x-download
Content-Disposition: attachment; filename=pdf4.pdf

Bill Moseley
moseley at hank.org

More information about the thelist mailing list