From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: make standard If-Modified-Since headers Date: Wed, 27 Feb 2008 20:46:34 -0500 Message-ID: References: <86pruy3q6p.fsf@lifelogs.com> <873arfl1ui.fsf_-_@jidanni.org> <867igqtp1g.fsf@lifelogs.com> <87ejayjuf8.fsf@ambire.localdomain> <863aretkoj.fsf@lifelogs.com> <86y796s33o.fsf@lifelogs.com> <47C5E307.6070200@gnu.org> <86tzjuow6x.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204163332 4299 80.91.229.12 (28 Feb 2008 01:48:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Feb 2008 01:48:52 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 28 02:49:18 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JUXtY-00071t-7P for ged-emacs-devel@m.gmane.org; Thu, 28 Feb 2008 02:49:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUXsx-0001LR-9Y for ged-emacs-devel@m.gmane.org; Wed, 27 Feb 2008 20:48:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUXss-0001LA-MP for emacs-devel@gnu.org; Wed, 27 Feb 2008 20:48:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUXsi-0001Ja-VS for emacs-devel@gnu.org; Wed, 27 Feb 2008 20:48:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUXsi-0001JX-Qi for emacs-devel@gnu.org; Wed, 27 Feb 2008 20:48:20 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUXsh-0002sG-RV for emacs-devel@gnu.org; Wed, 27 Feb 2008 20:48:20 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAOygxUdMCpz5Wmdsb2JhbACQXgEgnXqBAg X-IronPort-AV: E=Sophos;i="4.25,416,1199682000"; d="scan'208";a="15326091" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 27 Feb 2008 20:46:40 -0500 Original-Received: from pastel.home ([76.10.156.249]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id IDW51940; Wed, 27 Feb 2008 20:46:40 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id C05457F25; Wed, 27 Feb 2008 20:46:34 -0500 (EST) In-Reply-To: <86tzjuow6x.fsf@lifelogs.com> (Ted Zlatanov's message of "Wed, 27 Feb 2008 16:45:26 -0600") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:90679 Archived-At: 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