[thelist] HTTP headers for PDF files and IE

Mark Groen evolt at markgroen.com
Fri Oct 13 19:19:44 CDT 2006


On Fri, 2006-10-13 at 16:53 -0700, Bill Moseley wrote:

> 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-Peer: 208.97.158.169:80
> Client-Response-Num: 1
> Content-Disposition: attachment; filename=pdf1.pdf
> Set-Cookie: ws2_session=d85a081082fb023f3faae02f427f9a01777f415d; domain=.infopeople.org; path=/

Though you have your headers correct (seems like it to me, I see no
errors) there isn't a file extension on your URL. Even though you have
the length and type, IE will sometimes ignore that information because
of no file extension.

HEAD http://infopeople.org/pdf1.pdf

should work, hopefully!
-- 
cheers,

        Mark




More information about the thelist mailing list