Date format glitch

Hi friends,

In RFC2616 section 3.3.1 it says that "HTTP applications have historically 
allowed three different formats" and one of them is the RFC822/RFC1123 format.

It then goes on to say that RFC822 was updated by RFC1123 and that "clients 
and servers that parse the date value MUST accept all three formats". RFC1123 
basically only changed the year field to be 4-digit instead of 2-digit.

However - and here's my question/thoughts - the follwing BNF syntax 
description of the rfc1123 time in RFC2616 is incorrect by my reading of it. 
RFC822 has the seconds part of the time triplet (HH:MM:SS) optional. RFC822
defines it as:

  hour        =  2DIGIT ":" 2DIGIT [":" 2DIGIT]

This "flaw" is in httpbis as well and while I don't think it ever causes any 
particular problem anywhere, it just popped to my attention as I believed my 
parser that parses HTTP dates were RFC822 compliant when in fact it wasn't... 
(It was used to parse RFC822 date strings in a totally unrelated context when 
this was reported.)

It might be worth to note this. Or not. I just wanted to mention this.

-- 

  / daniel.haxx.se

Received on Sunday, 10 October 2010 21:08:39 UTC