all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Julien Danjou <julien@danjou.info>
To: "Alexander Pohoyda" <alexander.pohoyda@gmx.net>
Cc: 526@debbugs.gnu.org
Subject: bug#526: Emacs 22, url package, problems with cache
Date: Fri, 22 Jul 2011 16:04:01 +0200	[thread overview]
Message-ID: <sa3pql2wgxa.fsf@cigue.easter-eggs.fr> (raw)
In-Reply-To: <20080703102536.58570@gmx.net> (Alexander Pohoyda's message of "Thu, 03 Jul 2008 12:25:36 +0200")

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

  parent reply	other threads:[~2011-07-22 14:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03 10:25 bug#526: Emacs 22, url package, problems with cache Alexander Pohoyda
2008-07-07 12:36 ` Magnus Henoch
2008-07-07 12:45   ` Processed: " Emacs bug Tracking System
2011-07-22 14:04 ` Julien Danjou [this message]
2011-09-11 17:11 ` Lars Magne Ingebrigtsen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sa3pql2wgxa.fsf@cigue.easter-eggs.fr \
    --to=julien@danjou.info \
    --cc=526@debbugs.gnu.org \
    --cc=alexander.pohoyda@gmx.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.