W3C home > Mailing lists > Public > ietf-http-wg@w3.org > October to December 2010

Date format glitch

From: Daniel Stenberg <daniel@haxx.se>
Date: Sun, 10 Oct 2010 23:08:13 +0200 (CEST)
To: HTTP Working Group <ietf-http-wg@w3.org>
Message-ID: <alpine.DEB.2.00.1010102256180.17481@tvnag.unkk.fr>
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

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:10:55 UTC