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

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

bug#17549: 24.4.50; regression: url-insert-file-contents


From: Stefan Monnier
Subject: bug#17549: 24.4.50; regression: url-insert-file-contents
Date: Wed, 25 Jun 2014 22:38:37 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

> +(defconst url-http-codes)

This should use `defvar'.

> -      (let ((response (url-http-parse-response)))
> -        (if (and (>= response 200) (< response 300))
> -            (goto-char (point-min))
> -          (let ((desc (buffer-substring-no-properties (1+ (point))
> -                                                      (line-end-position))))
> +      (when (bound-and-true-p url-http-response-status)
> +        (unless (and (>= url-http-response-status 200)
> +                     (< url-http-response-status 300))
> +          (let ((desc (nth 2 (assq url-http-response-status 
> url-http-codes))))

IIUC the above just adds a "(when (bound-and-true-p
url-http-response-status)" wrapper around the existing code, right?
If so, it looks like a safe enough fix to install it in emacs-24.

This still doesn't look like The Right Way to do things in URL.
I think The Right Way would be for the url-http code to set some
backend-agnostic properties which url-handlers.el can then use.


        Stefan





reply via email to

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