mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 04:21:24 +00:00
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:
parent
1800350b18
commit
12eec781ed
1 changed files with 6 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue