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


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "Peder O. Klingenberg" <peder <at> klingenberg.no>
Subject: bug#79186: closed (Re: bug#79186: 31.0.50; Make dynamic binding
 of url-max-redirections work)
Date: Sat, 09 Aug 2025 12:49:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#79186: 31.0.50; Make dynamic binding of url-max-redirections work

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 79186 <at> debbugs.gnu.org.

-- 
79186: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79186
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: "Peder O. Klingenberg" <peder <at> klingenberg.no>
Cc: rpluim <at> gmail.com, 79186-done <at> debbugs.gnu.org
Subject: Re: bug#79186: 31.0.50;
 Make dynamic binding of url-max-redirections work
Date: Sat, 09 Aug 2025 15:48:19 +0300
> Cc: 79186 <at> debbugs.gnu.org
> From: "Peder O. Klingenberg" <peder <at> klingenberg.no>
> Date: Thu, 07 Aug 2025 20:14:26 +0200
> 
> On Thu, 2025-08-07 10:24:33 +0200, Robert Pluim wrote:
> 
> > 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 😀).
> 
> Thanks for the feedback.  All these quoting standards are so confusing.
> We should all decide on a new standard that will subsume all previous
> standards.  (Cue XKCD classic)
> 
> Anyway.  Updated patch attached.

Thanks, installed on master, and closing the bug.

[Message part 3 (message/rfc822, inline)]
From: "Peder O. Klingenberg" <peder <at> klingenberg.no>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Make dynamic binding of url-max-redirections work
Date: Wed, 06 Aug 2025 22:28:18 +0200
[Message part 4 (text/plain, inline)]
Following on from bug#61916, there was one variable I missed that should
also have a faux-dynamic binding: url-max-redirections.

To demonstrate:

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

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

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

With the attached patch it stops after the first redirection.

-- 
...Peder...

[0001-Emulate-dynamic-binding-of-url-max-redirections.patch (text/x-diff, attachment)]

This bug report was last modified 4 days ago.

Previous Next


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