Of the 603 mail messages and 197 news posts I have stored, every single
date header is RFC822 compliant with the exception that roughly half use
a four digit year (which I prefer) instead of two. The fact that there
exists non-compliant servers out there does not justify making HTTP servers
non-compliant.
> Now, do you have any valid arguments for *why* we should break hundreds
> of HTTP servers? It is VERY VERY important that HTTP software agree on
> the date format, and that it not change weekly. This isn't so with News
> and Mail (as is obvious by the lack of a real standard in those cases).
Break? The output format of the date makes no difference to the HTTP
server -- only to the clients (like the one I'm building). As for a change,
the NCSA httpd server just changed its date format to supposedly be RFC822
(see the announcement) and the fact that it is not should be pointed out.
Here is the one line change required to make NCSA httpd_1.0 compliant with
RFC822 and RFC1036 with the exception of the four-digit year:
----------------------------------------------------------------------
% diff -c save/util.c util.c
*** save/util.c Wed Dec 15 19:43:30 1993
--- util.c Wed Dec 15 19:44:28 1993
***************
*** 24,30 ****
t = gmtime(&sec);
/* check return code? */
! strftime(ts,MAX_STRING_LEN,"%A, %d-%h-%y %T GMT",t);
return ts;
}
--- 24,30 ----
t = gmtime(&sec);
/* check return code? */
! strftime(ts,MAX_STRING_LEN,"%a, %d %h %Y %T GMT",t);
return ts;
}
----------------------------------------------------------------------
>
> Clearly having a full year (instead of just two digits) is not optimial
> but neither is it a major problem (not until 2070 or so anyway).
>
> If we do end up changing then this is clearly the best format:
> Date: Tue, 04 Dec 1993 21:29:02 GMT
Which is what the above change does. I would be surprised if other
servers were any harder to change. What is important is that we don't
have a special date format for every protocol, resulting in a nightmare
for gateways and clients.
....Roy Fielding ICS Grad Student, University of California, Irvine USA
(fielding@ics.uci.edu)