From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Ted Zlatanov <tzz@lifelogs.com>
Cc: emacs-devel@gnu.org
Subject: Re: make standard If-Modified-Since headers
Date: Wed, 27 Feb 2008 20:46:34 -0500 [thread overview]
Message-ID: <jwvoda1am94.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <86tzjuow6x.fsf@lifelogs.com> (Ted Zlatanov's message of "Wed, 27 Feb 2008 16:45:26 -0600")
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
next prev parent reply other threads:[~2008-02-28 1:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <86y79m3u0q.fsf@lifelogs.com>
[not found] ` <87ve4q2cyf.fsf@jidanni.org>
2008-02-15 20:44 ` RSS If-Modified-Since Ted Zlatanov
2008-02-26 23:44 ` make standard If-Modified-Since headers jidanni
2008-02-27 15:08 ` Ted Zlatanov
2008-02-27 15:22 ` Thien-Thi Nguyen
2008-02-27 16:42 ` Ted Zlatanov
2008-02-27 17:47 ` Ted Zlatanov
2008-02-27 22:24 ` Jason Rumney
2008-02-27 22:39 ` Jason Rumney
2008-02-27 22:45 ` Ted Zlatanov
2008-02-28 1:46 ` Stefan Monnier [this message]
2008-02-28 2:31 ` Robert J. Chassell
2008-02-28 17:49 ` Ted Zlatanov
2008-02-28 18:23 ` Stefan Monnier
2008-02-28 18:54 ` Ted Zlatanov
2008-02-28 19:12 ` Miles Bader
2008-02-28 19:20 ` Stefan Monnier
2008-02-28 19:44 ` Ted Zlatanov
2008-02-28 20:58 ` Reiner Steib
2008-02-28 2:16 ` Robert J. Chassell
2008-02-28 10:22 ` Juanma Barranquero
2008-02-27 20:26 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvoda1am94.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=tzz@lifelogs.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).