GNU bug report logs - #526
Emacs 22, url package, problems with cache

Previous Next

Package: emacs;

Reported by: "Alexander Pohoyda" <alexander.pohoyda <at> gmx.net>

Date: Thu, 3 Jul 2008 10:35:03 UTC

Severity: normal

Tags: notabug

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Julien Danjou <julien <at> danjou.info>
To: "Alexander Pohoyda" <alexander.pohoyda <at> gmx.net>
Cc: 526 <at> debbugs.gnu.org
Subject: bug#526: Emacs 22, url package, problems with cache
Date: Fri, 22 Jul 2011 16:04:01 +0200
[Message part 1 (text/plain, inline)]
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 exists (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.

-- 
Julien Danjou
❱ http://julien.danjou.info
[Message part 2 (application/pgp-signature, inline)]

This bug report was last modified 13 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.