From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julien Danjou Newsgroups: gmane.emacs.bugs Subject: bug#526: Emacs 22, url package, problems with cache Date: Fri, 22 Jul 2011 16:04:01 +0200 Message-ID: References: <20080703102536.58570@gmx.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1311343524 25009 80.91.229.12 (22 Jul 2011 14:05:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 22 Jul 2011 14:05:24 +0000 (UTC) Cc: 526@debbugs.gnu.org To: "Alexander Pohoyda" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 22 16:05:17 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QkGLr-0003TB-Rn for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jul 2011 16:05:16 +0200 Original-Received: from localhost ([::1]:49780 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkGLr-0006zg-7r for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jul 2011 10:05:15 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkGLn-0006y5-Gg for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:05:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkGLe-0001E3-VP for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:05:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34679) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkGLe-0001Dn-Py for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QkGLd-0001c7-TP; Fri, 22 Jul 2011 10:05:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Julien Danjou Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 22 Jul 2011 14:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 526 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-Cc: 526@debbugs.gnu.org, bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13113434756170 (code B ref -1); Fri, 22 Jul 2011 14:05:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Jul 2011 14:04:35 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QkGLC-0001bT-P5 for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:04:35 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QkGLB-0001bH-Jd for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:04:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkGL0-00019Y-Vb for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:04:28 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:54543) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkGL0-00019U-U8 for submit@debbugs.gnu.org; Fri, 22 Jul 2011 10:04:22 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:52725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkGKv-0006mC-FE for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:04:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkGKo-00017m-BP for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:04:17 -0400 Original-Received: from prometheus.naquadah.org ([212.85.154.174]:47383 helo=mx1.naquadah.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkGKo-000176-66 for bug-gnu-emacs@gnu.org; Fri, 22 Jul 2011 10:04:10 -0400 Original-Received: from cigue.easter-eggs.fr (unknown [IPv6:2a01:e35:2eb3:b690:2::3a]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.naquadah.org (Postfix) with ESMTPSA id B3E2E5C0C8; Fri, 22 Jul 2011 16:04:07 +0200 (CEST) In-Reply-To: <20080703102536.58570@gmx.net> (Alexander Pohoyda's message of "Thu, 03 Jul 2008 12:25:36 +0200") User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Fri, 22 Jul 2011 10:05:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:49555 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, Jul 03 2008, Alexander Pohoyda wrote: > The url-automatic-caching variable is nil by default, so cache is not > written (even the cache directory is not created). However, if I manually > provide "If-Modified-Since" header in HTTP request and the server responds > with "Not Modified 304", the cache file is expected to exists and is > accessed -- which leads to error. > > Possible solution -- before accessing the cache file, check whether it ex= ists (url-is-cached). > Alternatively, do not expect a cache to exist if url-automatic-caching is= set to nil. I'm not sure this is really a bug after all. If you send a "If-Modified-Since" header, you have to already own a copy of the content. If what you propose is to return an empty buffer if there's no cache, that does not seems like the good solution neither. And I would not see the point to re-request the URL without the IMS header neither. 304 code is only returned if the client has done a conditional request, which should be the case *only* if it has a cached copy. Otherwise it's no sense. =2D-=20 Julien Danjou =E2=9D=B1 http://julien.danjou.info --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJOKYNRAAoJEGEbqVCLeKXC6pYP/iT6vSwqcOnFbiLQUJENF3RB w6HbcNFW3Z6dTJOQhHWsoE7bNmAUluiTYlGCgRzScbEySZtTwoXSomEq3L29ZT0N JGKicZpblsUQ+2ZGUPM6nxcahK+dnH2Ki3AfZINDe8kdH52RCQIZNJBfxvEi72Nl v6QxKANVOix3Pw8yxUs66m6YsKtPFgHI+CqU80UCMg29juR0hdMnE1oEo8O/pVj2 6/9EBR1nHCcTLPAiekk2nPeXrPRpFOjQE1eP/OcINLVKKPn/Lk3w1chgnGnCv9K2 ubgQaxem3WPm2j0JwH0jRbnh0YMoKd0pwlEJx9fBlyMPP1/OfclR6uO6WBjvvFbj mbKkb5FFoz0xpBdfnX+j3KAyl0VoD2thI6KUxwwG6NswxKy5TEo/mtJI8Rgkay27 +SnrcKsSptnaM8J+79QMdfiNjEvQXiTYGTVxi0OFt20DQypl4JspFlN+x/fM3WEn qh3EaQtMTyMCbDckRMBtiEcvbxoDAHcKzijjm5DB0e2jX3QlLyqLczoZC2BoQNHU Cg09mxyKSyRGvt7BRziwUZ+VqnbmWjZLI7X5BFZa30e8e9o0Dol1YMLRA71s4x+q OUNK8jnYPkjpT2594h/sHJglJMv2FOdifxwIhM41EI55AwBN8gt/8hFTBhgfcc/U X0SK4puyx3qJxdim5IE0 =zVAB -----END PGP SIGNATURE----- --=-=-=--