View Full Version : [Fixed] attachment.php generates non-RFC-complaint dates
jrx
Sat 28th Jun '03, 3:08am
While sniffing the response headers of a request to attachment.php, I noticed this:
Expires: Sun, 27 Jun 2004 07:05:48GMT
Last-Modified: Sat, 28 Jun 2003 06:15:27GMT
Notice that a space is missing before "GMT". This is not RFC compliant.
The problem lies in these two lines:
header("Expires: " . gmdate("D, d M Y H:i:s",time()+31536000) . "GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s",$attachmentinfo[dateline]) . "GMT");
"GMT" should be " GMT".
Paul
Sun 29th Jun '03, 7:27am
Confirmed. The same problem appears in:
avatar.php global.php admin/global.php mod/global.phpBest wishes,
Paul
Scott MacVicar
Fri 11th Jul '03, 1:01pm
looking at RFC 822 for Date / Time Syntax we should be using +0000 or nothing at all.
jrx
Fri 11th Jul '03, 2:00pm
looking at RFC 822 for Date / Time Syntax we should be using +0000 or nothing at all.Actually, only "GMT" is allowed in HTTP. See page 21 of RFC 2616 (HTTP 1.1): All HTTP date/time stamps MUST be represented in Greenwich Mean Time
(GMT), without exception. For the purposes of HTTP, GMT is exactly
equal to UTC (Coordinated Universal Time). This is indicated in the
first two formats by the inclusion of "GMT" as the three-letter
abbreviation for time zone, and MUST be assumed when reading the
asctime format. HTTP-date is case sensitive and MUST NOT include
additional LWS beyond that specifically included as SP in the
grammar.
HTTP-date = rfc1123-date | rfc850-date | asctime-date
rfc1123-date = wkday "," SP date1 SP time SP "GMT"
rfc850-date = weekday "," SP date2 SP time SP "GMT"
asctime-date = wkday SP date3 SP time SP 4DIGIT
date1 = 2DIGIT SP month SP 4DIGIT
; day month year (e.g., 02 Jun 1982)
date2 = 2DIGIT "-" month "-" 2DIGIT
; day-month-year (e.g., 02-Jun-82)
date3 = month SP ( 2DIGIT | ( SP 1DIGIT ))
; month day (e.g., Jun 2)
time = 2DIGIT ":" 2DIGIT ":" 2DIGIT
; 00:00:00 - 23:59:59
wkday = "Mon" | "Tue" | "Wed"
| "Thu" | "Fri" | "Sat" | "Sun"
weekday = "Monday" | "Tuesday" | "Wednesday"
| "Thursday" | "Friday" | "Saturday" | "Sunday"
month = "Jan" | "Feb" | "Mar" | "Apr"
| "May" | "Jun" | "Jul" | "Aug"
| "Sep" | "Oct" | "Nov" | "Dec"
So the only compliance issue is the lack of a space before "GMT".
vBulletin® v3.8.0 Alpha 1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.