emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with url-retrieve when HTTP status is 304


From: Stefan Monnier
Subject: Re: Problem with url-retrieve when HTTP status is 304
Date: Mon, 16 Jan 2006 13:59:44 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> With CVS Emacs, url-retrieve triggers an error when it gets an HTTP status
> of 304 *and* the requested page is not in the cache.  To reproduce, try
> this:

> (setq url-request-extra-headers
> '(("If-Modified-Since" . "Sun, 18 Sep 2005 17:34:28 GMT")
>   ("If-None-Match" . "\"91ad777b5809a56e2b2b9d7c4833fceb\"")))
> (url-retrieve-synchronously "http://tumbleblindly.org/feed/";)

Just so I understand the problem better: where did you get info such as
"Sun, 18 Sep 2005 17:34:28 GMT" ?

> It's not clear which should change--the section of url-http-parse-headers
> which handles 304 or url-cache-extract.  One of them should check to see
> whether the cache file exists before trying to insert its contents.

It seems neither can do anything: when we receive a 304 and there's no cache
file, we simply don't have the body, so we can't complete the operation.

I.e. I'm tempted to say the problem is that the ("If-Modified-Since"
. "Sun, 18 Sep 2005 17:34:28 GMT") was used even though there's no cache
file for it.

Would you want URL to handle such a situation in a similar way to
a redirect (i.e. it removes the If-Modified-Since header and tries again)?
Or should it return an empty body?


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]