unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#526: Emacs 22, url package, problems with cache
@ 2008-07-03 10:25 Alexander Pohoyda
  2008-07-07 12:36 ` Magnus Henoch
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alexander Pohoyda @ 2008-07-03 10:25 UTC (permalink / raw)
  To: bug-gnu-emacs

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.

-- 
Alexander Pohoyda <alexander.pohoyda@gmx.net>
PGP Key fingerprint:
7F C9 CC 5A 75 CD 89 72  15 54 5F 62 20 23 C6 44









^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#526: Emacs 22, url package, problems with cache
  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
  2011-09-11 17:11 ` Lars Magne Ingebrigtsen
  2 siblings, 1 reply; 5+ messages in thread
From: Magnus Henoch @ 2008-07-07 12:36 UTC (permalink / raw)
  To: 526

reassign 526 emacs,url
thanks

I keep meaning to clean up and fix various things in the url package,
but now I _definitely_ don't have time.  It would be nice if someone
else took a look at this.

Magnus






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Processed: Re: bug#526: Emacs 22, url package, problems with cache
  2008-07-07 12:36 ` Magnus Henoch
@ 2008-07-07 12:45   ` Emacs bug Tracking System
  0 siblings, 0 replies; 5+ messages in thread
From: Emacs bug Tracking System @ 2008-07-07 12:45 UTC (permalink / raw)
  To: Magnus Henoch; +Cc: Emacs Bugs, url #526

Processing commands for control@emacsbugs.donarmstrong.com:

> reassign 526 emacs,url
bug#526: Emacs 22, url package, problems with cache
Warning: Unknown package 'url'
bug reassigned from package `emacs' to `emacs,url'.

> thanks
Stopping processing here.

Please contact me if you need assistance.

Don Armstrong
(administrator, Emacs bugs database)





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#526: Emacs 22, url package, problems with cache
  2008-07-03 10:25 bug#526: Emacs 22, url package, problems with cache Alexander Pohoyda
  2008-07-07 12:36 ` Magnus Henoch
@ 2011-07-22 14:04 ` Julien Danjou
  2011-09-11 17:11 ` Lars Magne Ingebrigtsen
  2 siblings, 0 replies; 5+ messages in thread
From: Julien Danjou @ 2011-07-22 14:04 UTC (permalink / raw)
  To: Alexander Pohoyda; +Cc: 526

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#526: Emacs 22, url package, problems with cache
  2008-07-03 10:25 bug#526: Emacs 22, url package, problems with cache Alexander Pohoyda
  2008-07-07 12:36 ` Magnus Henoch
  2011-07-22 14:04 ` Julien Danjou
@ 2011-09-11 17:11 ` Lars Magne Ingebrigtsen
  2 siblings, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-11 17:11 UTC (permalink / raw)
  To: Alexander Pohoyda; +Cc: 526

"Alexander Pohoyda" <alexander.pohoyda@gmx.net> writes:

> 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.

I don't think this is a bug.  You've (manually) claimed to have a cached
copy of the item, and you don't -- so you should get an error, in my
opinion.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-09-11 17:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2011-09-11 17:11 ` Lars Magne Ingebrigtsen

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).