You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Goldman, Stephen M." <Go...@swrmc.navy.mil> on 2005/04/22 20:18:33 UTC
[Pragma] = [No-cache] header added automatically
I am running Tomcat 5.5.7 with Apache 2.0.54 and mod_jk 1.2.10 with SSL and
am experiencing problems downloading files using IE. Microsoft has a
technical bulletin on this issue (Q323308). Microsoft has a registry hack
to fix this, but to do this on all of the companies machines is not an
option. Looking at the mod_jk log is seems that Tomcat is automatically
adding the no cache header to the download. Is there anyway to disable
this?
[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
ajp_unmarshal_response::jk_ajp_common.c (606): status = 200
[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
ajp_unmarshal_response::jk_ajp_common.c (613): Number of headers is = 6
[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
ajp_unmarshal_response::jk_ajp_common.c (669): Header[0] [Set-Cookie] =
[JSESSIONIDSSO=CDBF403D94E7C8CEF1B65F9C32717B75; Expires=Thu, 01-Jan-1970
00:00:10 GMT]
[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
ajp_unmarshal_response::jk_ajp_common.c (669): Header[1] [Pragma] =
[No-cache]
[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
ajp_unmarshal_response::jk_ajp_common.c (669): Header[2] [Cache-Control] =
[no-cache]
[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
ajp_unmarshal_response::jk_ajp_common.c (669): Header[3] [Expires] = [Wed,
31 Dec 1969 16:00:00 PST]
[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
ajp_unmarshal_response::jk_ajp_common.c (669): Header[4] [Content-Type] =
[text/html;charset=iso-8859-1]
[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
ajp_unmarshal_response::jk_ajp_common.c (669): Header[5] [Content-Length] =
[4969]
[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
ajp_connection_tcp_get_message::jk_ajp_common.c (1024): received from ajp13
pos=0 len=4973 max=8192
Re: [Pragma] = [No-cache] header added automatically
Posted by Mark Leone <mi...@cox.net>.
You've run into http://issues.apache.org/bugzilla/show_bug.cgi?id=28750
See the above link for an explanation, and to configure Tomcat to avoid
this M$ "feature", see
http://issues.apache.org/bugzilla/show_bug.cgi?id=27122
The problem is that IE interprets the "no-cache" cache control HTTP
headers as forbidding the temporary caching IE does while streaming a
file into an app or the local file system, contrary to the semantics
defined for these headers in the HTTP spec (we're all shocked, I know).
Thus when the app or file system requests the file that was supposed to
be downloaded, IE doesn't find it, and cleverly reports that the site is
unreachable.
Tomcat adds the "No-cache" directives to the Pragma and Cache-Control
HTTP headers when a client retrieves a file from within a context in
Tomcat that is protected by a security constraint. To disable this, you
just have to configure the authenticator to not do this. Put the
following in your server.xml file for each context from which you want
to download files:
<Context path="/myapp" docBase="myapp">
<Valve className="org.apache.catalina.authenticator.FormAuthenticator"
disableProxyCaching="false" />
</Context>
Note that if you're not using Form authentication, then substitue the
class name of the authenticator you're using.
Goldman, Stephen M. wrote:
>I am running Tomcat 5.5.7 with Apache 2.0.54 and mod_jk 1.2.10 with SSL and
>am experiencing problems downloading files using IE. Microsoft has a
>technical bulletin on this issue (Q323308). Microsoft has a registry hack
>to fix this, but to do this on all of the companies machines is not an
>option. Looking at the mod_jk log is seems that Tomcat is automatically
>adding the no cache header to the download. Is there anyway to disable
>this?
>
>
>
>[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
>ajp_unmarshal_response::jk_ajp_common.c (606): status = 200
>
>[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
>ajp_unmarshal_response::jk_ajp_common.c (613): Number of headers is = 6
>
>[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
>ajp_unmarshal_response::jk_ajp_common.c (669): Header[0] [Set-Cookie] =
>[JSESSIONIDSSO=CDBF403D94E7C8CEF1B65F9C32717B75; Expires=Thu, 01-Jan-1970
>00:00:10 GMT]
>
>[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
>ajp_unmarshal_response::jk_ajp_common.c (669): Header[1] [Pragma] =
>[No-cache]
>
>[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
>ajp_unmarshal_response::jk_ajp_common.c (669): Header[2] [Cache-Control] =
>[no-cache]
>
>[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
>ajp_unmarshal_response::jk_ajp_common.c (669): Header[3] [Expires] = [Wed,
>31 Dec 1969 16:00:00 PST]
>
>[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
>ajp_unmarshal_response::jk_ajp_common.c (669): Header[4] [Content-Type] =
>[text/html;charset=iso-8859-1]
>
>[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
>ajp_unmarshal_response::jk_ajp_common.c (669): Header[5] [Content-Length] =
>[4969]
>
>[Fri Apr 22 10:45:42 2005] [2848:1568] [debug]
>ajp_connection_tcp_get_message::jk_ajp_common.c (1024): received from ajp13
>pos=0 len=4973 max=8192
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org