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 16:45:26 -0600
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

On Wed, 27 Feb 2008 22:24:07 +0000 Jason Rumney <address@hidden> wrote: 

JR> IIRC, only a small subset of timezone names are allowed in HTTP
JR> headers, so %z would be better than %Z, or alternatively hardcode GMT:
JR> ...
JR> (format-time-string "%a, %d %b %Y %T GMT"
JR>         (or specified-time (current-time)) t)
...
JR> In fact, RFC2616 (3.3.1) states: "All HTTP date/time stamps MUST be
JR> represented in Greenwich Mean Time (GMT), without exception. For the
JR> purposes of HTTP, GMT is exactly equal to UTC (Coordinated Universal
JR> Time)."

JR> So hardcoding GMT here is correct.

Cool, thanks for clarifying.  So the function will now read:

(defun url-get-normalized-date (&optional specified-time)
 "Return a 'real' date string that most HTTP servers can understand."
 (let ((system-time-locale "C"))
  (format-time-string "%a, %d %b %Y %T GMT"
   (or specified-time (current-time)) t)))

Is that OK with everyone?  It needs to go into both the test release as
a bug fix and into the CVS HEAD.

I should still have CVS commit permissions from savannah so I can commit
this, if it's OK with the maintainers.

Ted





reply via email to

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