From owner-freebsd-hackers Sat May 31 18:11:30 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id SAA26977 for hackers-outgoing; Sat, 31 May 1997 18:11:30 -0700 (PDT) Received: from awfulhak.demon.co.uk (awfulhak.demon.co.uk [158.152.17.1]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id SAA26971 for ; Sat, 31 May 1997 18:11:25 -0700 (PDT) Received: from awfulhak.demon.co.uk (localhost [127.0.0.1]) by awfulhak.demon.co.uk (8.8.5/8.8.5) with ESMTP id BAA10800; Sun, 1 Jun 1997 01:04:48 +0100 (BST) Message-Id: <199706010004.BAA10800@awfulhak.demon.co.uk> X-Mailer: exmh version 1.6.9 8/22/96 To: Terry Lambert cc: brian@awfulhak.org (Brian Somers), freebsd-hackers@FreeBSD.ORG, internet@demon.net Subject: Re: fetch In-reply-to: Your message of "Sat, 31 May 1997 11:27:34 PDT." <199705311827.LAA11005@phaeton.artisoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 01 Jun 1997 01:04:47 +0100 From: Brian Somers Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Hi, > > > > My ISP (demon.co.uk) sends http dates like this: > > > > Sat, 31-May-97 10:48:56 GMT > > > > According to http.c in the fetch sources, it's expecting > > a full year here, ie. > > > > Sat, 31-May-1997 10:48:56 ..... > > > > Has anyone any objection to me making it allow the first ? > > As long as you treat it as the year 0097, no objection at all; > otherwise you are introducing a year 2000 error. That's clearly wrong too. There's not much to gain by being pedantic here. The year 2000 AFAICS is a non-issue as I would expect this format to say "31-May-101" in 4 years time, and struct tm expects "year-1900". rfc822 says that 31-May-97 is ok. rfc1123 says: The syntax for the date is hereby changed to: date = 1*2DIGIT month 2*4DIGIT All mail software SHOULD use 4-digit years in dates, to ease the transition to the next century. And rfc2068 says: HTTP applications have historically allowed three different formats for the representation of date/time stamps: Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036 Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format The first format is preferred as an Internet standard and represents a fixed-length subset of that defined by RFC 1123 (an update to RFC 822). The important bit here is that it specifically says that only the fixed length version is ok. The next paragraph says: Note: Recipients of date values are encouraged to be robust in accepting date values that may have been sent by non-HTTP applications, as is sometimes the case when retrieving or posting messages via proxies/gateways to SMTP or NNTP. So the "spirit" is to be lenient with people, although the letter of the law says it's gotta be four digit. I'd therefore consider it reasonable to accept two or three digit years as being assignable directly to tm_year, and four digit years as being subject to the "-1900" code. > Has demon refused to correct their server software? Or have > they not been asked? They havn't been asked (yet). I've cc'd them and would expect a reply sometime soon. > Terry Lambert > terry@lambert.org > --- > Any opinions in this posting are my own and not those of my present > or previous employers. -- Brian , Don't _EVER_ lose your sense of humour....