Richard Stallman <[EMAIL PROTECTED]> writes:

> [I sent this message twice but did not get a response.]
>
> Would someone please look at this and DTRT and ack?  There is no
> particular maintainer of URL, but we need to fix the bugs.
> Would someone please fix this one?
>
> From: Klaus Straubinger <[EMAIL PROTECTED]>
> Subject: variable url-automatic-caching defined but not used
> To: [email protected]
> Date: Fri, 7 Jan 2005 13:41:40 +0100 (CET)
> X-SAP: out
> X-Spam-Status: No, hits=0.5 required=5.0 tests=RCVD_IN_ORBS version=2.55
> X-Spam-Level: 
> X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)
>
> The file url/url-vars.el defines the variable url-automatic-caching,
> but it is not used in the whole URL package anywhere. What is worse,
> the current behaviour (i.e., caching always) does not correspond to
> the default nil setting of this variable.
>
> The function url-store-in-cache in url-cache.el seems a good place to
> implement the intended functionality.

I didn't like the idea of making url-store-in-cache work based on the
value of url-automatic-caching, so I think the following patch is the
best simple fix:

Index: url-http.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/url/url-http.el,v
retrieving revision 1.9
diff -u -p -r1.9 url-http.el
--- url-http.el 22 Jan 2005 10:52:28 -0000      1.9
+++ url-http.el 10 Feb 2005 13:51:47 -0000
@@ -413,7 +413,7 @@ should be shown to the user."
          ;; Generic success for all others.  Store in the cache, and
          ;; mark it as successful.
          (widen)
-         (if (equal url-http-method "GET")
+         (if (and url-automatic-caching (equal url-http-method "GET"))
              (url-store-in-cache (current-buffer)))
          (setq success t))))
       (3                               ; Redirection

-- 
Michael Welsh Duggan
([EMAIL PROTECTED])


_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to