summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2026-05-22 10:26:37 -0400
committerAmin Bandali <bandali@gnu.org>2026-05-23 13:27:22 -0400
commit12eec781ed69c4fc7611e8c9a1953ad33da98a0c (patch)
treef915931668d8278c5afa1d19f12bd0d20aaad7a8 /lisp
parent1800350b186864130e16c8618cbcb072c564637e (diff)
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/url/url-http.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index ce512c6db33..0be1b326d6c 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -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