Subject: | Weird problem with Apache-Coyote Last-modifed |
For some unknown reason I've spotted a non-conformat header from Apache.
Last-Modified: Tue, 25 January 2011 21:18:00 GMT
It's a simple and logical patch to the current code to work around it.
Basically, since the @MoY field is all three letter combos, a
modification to the default match string seems to fix this issue
--- /var/www/cgi-bin/mte/extlib/HTTP/Date.pm 2011-01-25
16:25:21.000000000 -0500
+++ xxx 2011-01-25 16:24:57.000000000 -0500
@@ -37,7 +37,7 @@
return undef unless defined $str;
# fast exit for strictly conforming string
- if ($str =~ /^[SMTWF][a-z][a-z], (\d\d) ([JFMAJSOND][a-z][a-z])
(\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$/) {
+ if ($str =~ /^[SMTWF][a-z][a-z], (\d\d)
([JFMAJSOND][a-z][a-z])[a-z]* (\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$/) {
return eval {
my $t = Time::Local::timegm($6, $5, $4, $1, $MoY{$2}-1, $3-1900);
$t < 0 ? undef : $t;