|
Posted by David E. Ross on February 5, 2007, 7:23 pm
Please log in for more thread options
timothy wrote:
> My web application pushes an extemporaneous PDF file out to a web
> page. It adds a 'Content-type: application/pdf' header to the HTTP
> headers, but the web server automatically adds a 'Content-type:
> text/html' header before mine.
>
> Firefox embeds this in a web page just fine, but IE always brings up
> the full Adobe reader application to show the file. Is this caused by
> this first header? The web server gives me no way to remove it. I
> could find nothing in Google but that IE has had some 'Content-type:'
> problems in the past. A quick glance at the RFC revealed nothing
> about how conflicting headers should be handled.
>
> Any ideas?
>
> Thanks,
>
> Tim S.
If your Web server is Apache (and perhaps others), set the .htaccess
file to contain:
AddType application/pdf pdf
This goes in the root of your domain; that is, for my Web site, it would
go directly in www.rossde.com, which is www.vcnet.com/~rossde. Then, it
should override what your server's default .htaccess file is doing,
which is incorrect.
You should also contact your host server's operator and request that
they correct their default .htaccess file.
--
David E. Ross
<http://www.rossde.com/>
I use SeaMonkey as my Web browser because I want
a browser that complies with Web standards. See
<http://www.mozilla.org/projects/seamonkey/>.
|