No longer raise error on HTTP 402 (Payment Required) (bug#81101)

* lisp/url/url-http.el (url-http-parse-headers): Return t instead of
raising an error, to give the user a chance to interact with the page.
This commit is contained in:
Amin Bandali 2026-05-22 10:26:37 -04:00
parent 1800350b18
commit 12eec781ed

View file

@ -826,9 +826,12 @@ should be shown to the user."
;; Authorization header field.
(url-http-handle-authentication nil))
('payment-required ; 402
;; This code is reserved for future use
(url-mark-buffer-as-dead buffer)
(error "Somebody wants you to give them money"))
;; This code is "reserved for future use", but in the
;; mean time websites have been seen to use it, for
;; instance anti-bot challenges requiring the "payment"
;; of a click of a button to prove the visitor is human,
;; so we no longer raise an `error' here.
t)
('forbidden ; 403
;; The server understood the request, but is refusing to
;; fulfill it. Authorization will not help and the request