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: Stefan Monnier
Subject: Re: make standard If-Modified-Since headers
Date: Wed, 27 Feb 2008 20:46:34 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

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.

Seeing how the previous code is a good bit more complex, the change
looks good.


        Stefan




reply via email to

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