tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: AW: Re: AW: Re: AW: RE: RE: Ignore http header if-modified-since
Date Fri, 18 Dec 2009 15:44:01 GMT
Hash: SHA1


On 12/18/2009 5:32 AM, Mark Thomas wrote:
> On 18/12/2009 08:41, Abid Hussain wrote:
>> Hi,
>> I'm using Tomcat 6.0.20, installed on a german Windows XP.
>> I'm quite sure that the cause is tomcat's code.
> And I'm quite sure it isn't. I have tested trunk, 6.0.x and 6.0.20 and
> all behave correctly.
>> When I use e.g. for 
>> startup polish locale:
>> -Duser.language=pl
>> -Duser.region=PL
>> Tomcat delivers the Last-Modified header in polish:
>> Pt, 18 gru 2009 08:33:49 GMT
>> The Date header is always in correct format, no matter what locale is 
>> configured:
>> Fri, 18 Dec 2009 08:33:49 GMT
> If Tomcat generates the Last-Modified header, it generates it the same
> way as it generates the Date header.

Yes and no: the Http11Processor, for example, uses
o.a.t.util.http.FastHttpDateFormat.getCurrentDate() (which uses a
SimpleDateFormat configured for Locale.US), while the DefaultServlet
uses its own SimpleDateFormat similarly configured.

> What looks more likely at this point is an application level component
> generating the header and using the default Locale rather than the US
> Locale.

I completely agree. One way to find this would be to write a filter that
wraps the request and dumps a stack trace when that header is set:

public void addHeader(String name, String value) {
    new Throwable("Date header is being added").printStackTrace();

  super.setHeader(name, value);


public void setHeader(String name, String value) {
    new Throwable("Date header is being set").printStackTrace();

  super.setHeader(name, value);

- -chris
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message