Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jun 1997 09:04:35 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        brian@awfulhak.org (Brian Somers)
Cc:        terry@lambert.org, brian@awfulhak.org, freebsd-hackers@FreeBSD.ORG, internet@demon.net
Subject:   Re: fetch
Message-ID:  <199706021604.JAA14574@phaeton.artisoft.com>
In-Reply-To: <199706010004.BAA10800@awfulhak.demon.co.uk> from "Brian Somers" at Jun 1, 97 01:04:47 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 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.

This is the old "be strict in what you generate, lenient in what you
accept".

I don't disagree with that.

What I *am* being strict about is interpretation of the value.  I
don't think the value matters... but if it did, you should send the
right one out.  If it's only a relative timestamp (that's all IE and
NetScape care about there), then interpreting it as "year 97" won't
hurt, and will encourage *them* to get it right the next time.  This
is because, by the same token, they should "be strict in what they
generate, lenient in what they accept".

If both sides were to fully honor the pact, the date format would
never go past 2 digits, because certainly there are some programs
which can't accept 4, but can accept 2.


> 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.

Assignable as "19xx +" and "1xxx +", or assignable as "00xx"?  If the
latter, then tht's all I was saying.  8-).


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706021604.JAA14574>