Re: Possible bug in Tomcat Date header handling

2011-08-26 Thread Mark Thomas
On 26/08/2011 16:25, Mick Sear wrote: Tomcat 7.0.20 Windows XP JDK 1.6.0_20 I think there is a bug in Tomcat's handling of the Date HTTP header. I disagree. When the system clock time is advanced and then put back, with an HTTP request being handled in between those two actions, Tomcat

Re: Possible bug in Tomcat Date header handling

2011-08-26 Thread Henri Gomez
The fix is to address the root cause which appears to be a poorly configured system clock. I am loath to add a work-around at any point in the Tomcat source code to handle time apparently going backwards rather than forwards. +1. It's SysAdmin team responsability to ensure hosting machine

Re: Possible bug in Tomcat Date header handling

2011-08-26 Thread Christopher Schultz
Mark and Mick, On 8/26/2011 11:45 AM, Mark Thomas wrote: The fix is to address the root cause which appears to be a poorly configured system clock. I am loath to add a work-around at any point in the Tomcat source code to handle time apparently going backwards rather than forwards. +1 This

Re: Possible bug in Tomcat Date header handling

2011-08-26 Thread Mick Sear
I agree that a poorly configured system clock is not something Tomcat is responsible for, per se. However, there is a problem in the following code as I see it, which can be easily fixed by checking also for a negative number. This is a small fix that caters for people being dumb: /** * Get the

Re: Possible bug in Tomcat Date header handling

2011-08-26 Thread Konstantin Kolinko
2011/8/26 Mick Sear mick.s...@succeed.co.uk: I also think that looking at this code, if clocks go back at, say, 2am in a given time zone, Tomcat will report 2am in an HTTP header continually for 1 hour. Am I wrong? The header is in GMT. It does not matter what timezone your OS uses. [[[