[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50511: 27.2; url-http-handle-authentication should not raise error
From: |
Lars Ingebrigtsen |
Subject: |
bug#50511: 27.2; url-http-handle-authentication should not raise error |
Date: |
Sat, 11 Sep 2021 15:05:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Jonas Bernoulli <jonas@bernoul.li> writes:
> Since [1: 64b469f6ae] url-http-handle-authentication raises an error
> when it detects that we already tried to make an authenticated request.
>
> 1: 2019-07-26 64b469f6ae8173116ec948ac43cd44efe4b5a221
> Don't infloop in url.el when sending invalid basic auth
>
> Instead of signaling an error using `error', it should simply return t
> to indicate that no further requests should be made and the response
> data (in this case error data) should be passed to the handler, i.e. to
> indicate that the request "successfully failed". Then the error handler
> can inspect the response and decide how to react.
>
> This is how it is done for all other https response codes, including all
> other error codes. This approach also solves the infloop issue but also
> makes it possible to use an error handler as intended.
Makes sense. Can you propose a patch for this (since you can reproduce
the problem and verify that the patch fixes it)?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no