By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,785 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,785 IT Pros & Developers. It's quick & easy.

Different Content-type: headers, Firefox and IE

P: n/a

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.
Feb 5 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On 5 Feb, 18:53, timothy <tschaef...@acesoft.comwrote:
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.
Then fix the web app / web server. It's not hard to do this on any of
the major web scripting platforms.

Feb 5 '07 #2

P: n/a
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/>.
Feb 6 '07 #3

P: n/a
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,
How are you doing that?
but the web server automatically adds a 'Content-type:
text/html' header before mine.
Feb 6 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.