emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make standard If-Modified-Since headers


From: Ted Zlatanov
Subject: Re: make standard If-Modified-Since headers
Date: Wed, 27 Feb 2008 09:08:43 -0600
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

>>>>>> "TZ" == Ted Zlatanov <address@hidden> writes:

TZ> On Sat, 16 Feb 2008 04:15:36 +0800 address@hidden wrote: 
j> Well OK but I bet
j> If-modified-since: Wednesday, 13-Feb-08 00:45:19 GMT
j> means 1908.

TZ> You may be right, RFC 850 doesn't specify the conversion.  Sorry I
TZ> didn't consider that in my original response (typical engineer response
TZ> to man in balloon asking "where am I" -- "in the air" :)

TZ> I don't know if the date should be 1900+x or (1900+x when x > 50, 2000+x
TZ> otherwise).  I'll bet that's one of the reasons RFC 850 is obsolete, so
TZ> let's instead try to fix the root problem.

TZ> So, what's sending that header?  In Emacs 22, it seems to be
TZ> lisp/url/url-util.el:url-get-normalized-date and it definitely has the
TZ> behavior you noted.  Since the bug may affect other things (there's a
TZ> comment about Plexus servers in the code) I won't attempt to fix it
TZ> myself, though it's not hard to do.  Please, emacs-devel-opers, let me
TZ> know if I should submit a fix.

TZ> I think format-time-string is the right function to do this, but there's
TZ> probably subtleties that I don't know.  At least for time zones,
TZ> format-time-string will handle them correctly.

On Wed, 27 Feb 2008 07:44:37 +0800 address@hidden wrote: 

j> Can you people please make If-Modified-Since headers like say,
j> firefox? Here is an If-Modified-Since header made by firefox:
j> If-Modified-Since: Wed, 13 Feb 2008 00:45:19 GMT

Please note that this is not Firefox-specific.  The date format is a RFC
specification, and currently url-get-normalized-date is returning the
RFC 850 format which is obsoleted by the newer relevant RFC.

As I said, I'll write a fix if necessary, but wanted to ask for opinions
to make sure existing code (especially parsers that might depend on the
old format) doesn't break.

Ted





reply via email to

[Prev in Thread] Current Thread [Next in Thread]