You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ritu Kedia <RK...@saba.com> on 2005/02/08 14:51:06 UTC

Content-Type removed from the Http Response when file is accessed through Tomcat Connector

Hello All,

I am facing a problem with the Content-Type getting removed from the Http
Response when accessing a binary file packaged in a WAR file through a Web
Server (IIS 5.0 or Apache 2.0).

My web.xml has the following mime-type mapping:
	<mime-mapping>
		<extension>msi</extension>
		<mime-type>application/x-msi</mime-type>
	</mime-mapping>

I have a .msi file packaged inside a WAR which is deployed on JBoss-Tomcat
(Tomcat-4.1.x). When I access this msi file through IE browser the browser
reads the contents of the msi and displays in the borwser instead of
prompting for saving this file.

I have tested accessing this file directly from the port 8080, which works
fine. It appears that Tomcat connector which is intercepting the requests to
and from the Web Server is somehow removing the Content-Type from the Http
Response. 

I have tested fronting Tomcat with IIS 5.0 as well as Apache 2.0. The
problem persists on both configurations. 

Could anyone please point out what am I doing wrong or whether this is a
known issue?

Thanks,
Ritu


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Content-Type removed from the Http Response when file is accessed through Tomcat Connector

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
Bedrijven.nl wrote:

>maybe security (settings) of ie??
>  
>

The poster clearly indicated that the thing works on Tomcat direct port. 
Could be that JK is stripping that header. Maybe it expects web server 
to provide it's own? You could try to setup MIME type on the Apache 
itself and see if it fixes the problem.

I do realise that this is highly impractical, in a general case 
scenario. JK shouldn't strip that header.

The question is, is it being setup by Tomcat in the first place? I mean, 
is Coyote JK actually removing or not creating the header in question?

Nix.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Content-Type removed from the Http Response when file is accessed through Tomcat Connector

Posted by "Bedrijven.nl" <ma...@bedrijven.nl>.
maybe security (settings) of ie??

maarten

-----Oorspronkelijk bericht-----
Van: Ritu Kedia [mailto:RKedia@saba.com]
Verzonden: Tuesday, February 08, 2005 2:51 PM
Aan: 'tomcat-user@jakarta.apache.org'
Onderwerp: Content-Type removed from the Http Response when file is
accessed through Tomcat Connector


Hello All,

I am facing a problem with the Content-Type getting removed from the Http
Response when accessing a binary file packaged in a WAR file through a Web
Server (IIS 5.0 or Apache 2.0).

My web.xml has the following mime-type mapping:
	<mime-mapping>
		<extension>msi</extension>
		<mime-type>application/x-msi</mime-type>
	</mime-mapping>

I have a .msi file packaged inside a WAR which is deployed on JBoss-Tomcat
(Tomcat-4.1.x). When I access this msi file through IE browser the browser
reads the contents of the msi and displays in the borwser instead of
prompting for saving this file.

I have tested accessing this file directly from the port 8080, which works
fine. It appears that Tomcat connector which is intercepting the requests to
and from the Web Server is somehow removing the Content-Type from the Http
Response.

I have tested fronting Tomcat with IIS 5.0 as well as Apache 2.0. The
problem persists on both configurations.

Could anyone please point out what am I doing wrong or whether this is a
known issue?

Thanks,
Ritu


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org