GNU bug report logs - #79186
31.0.50; Make dynamic binding of url-max-redirections work

Previous Next

Package: emacs;

Reported by: "Peder O. Klingenberg" <peder <at> klingenberg.no>

Date: Wed, 6 Aug 2025 20:51:02 UTC

Severity: normal

Tags: patch

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Full log


Message #10 received at 79186 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: "Peder O. Klingenberg" <peder <at> klingenberg.no>
Cc: 79186 <at> debbugs.gnu.org
Subject: Re: bug#79186: 31.0.50; Make dynamic binding of
 url-max-redirections work
Date: Thu, 07 Aug 2025 10:24:33 +0200
>>>>> On Wed, 06 Aug 2025 22:28:18 +0200, "Peder O. Klingenberg" <peder <at> klingenberg.no> said:

    Peder> Following on from bug#61916, there was one variable I missed that should
    Peder> also have a faux-dynamic binding: url-max-redirections.

    Peder> To demonstrate:

    Peder> (setq url-debug t) ;; and follow the results in the *URL-DEBUG* buffer
    Peder> (setq url-max-redirections 30) ;; the default

    Peder> (let ((url-max-redirections 0))
    Peder>   (url-retrieve "http://httpbin.org/redirect/5"
    Peder>     #'(lambda (&rest _args)
    Peder>         (message "done"))))

    Peder> This will cause 5 redirections to be followed by url-http.el, because it
    Peder> still sees url-max-redirections as 30.

    Peder> With the attached patch it stops after the first redirection.

I tried to apply this, but it failed because you quoted `like this`,
which our commit hooks reject. Best is to quote 'like this' in commit
messages and resubmit (this also gives you the chance to add
(Bug#79186) somewhere in the commit message 😀).

Robert
-- 




This bug report was last modified 2 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.