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

From: Stefan Monnier <[email-masked]>
Date: Wed, 25 Jun 2014 22:38:37 -0400

> +(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