tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goldman, Stephen M." <Goldma...@swrmc.navy.mil>
Subject RE: [Pragma] = [No-cache] header added automatically
Date Mon, 25 Apr 2005 14:36:14 GMT
Mark,

Thanks a lot.  That fixed my problem.

Stephen

-----Original Message-----
From: Mark Leone [mailto:midnightjava@cox.net] 
Sent: Friday, April 22, 2005 6:49 PM
To: Tomcat Users List
Subject: Re: [Pragma] = [No-cache] header added automatically

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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message