git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] http: preserve wwwauth_headers across redirects

From
Michal Suchánek <msuchanek@suse.de>
Date
Nov 4, 2026, 15:35 UTC
Message-ID
<autQ3CB9bD9IIpXp@kunlun.suse.cz>
In-Reply-To
<20261104062423.GA1763458@coredump.intra.peff.net>
Hello,
On Wed, Nov 04, 2026 at 01:24:23AM -0500, Jeff King wrote:
Show 15 quoted lines
> On Wed, Aug 19, 2026 at 08:21:04PM -0700, Aaron Plattner wrote:
> 
> > When cURL follows a redirect, it calls the CURLOPT_HEADERFUNCTION for
> > each header received including ones from a redirect. http_request() sets
> > fwrite_wwwauth() as the header function, which will record the wwwauth[]
> > entries for the last step in the redirection chain.
> > 
> > However, when http_request_recoverable() sees that cURL followed a
> > redirect, it attempts to update the credentials for the request from the
> > new URL using credential_from_url(). The first thing that does is call
> > credential_clear(), which clears everything including wwwauth_headers.
> > 
> > If the new URL should use a credential helper rather than credentials
> > embedded in the URL, this loses the list of authentication methods that
> > the server provided in the redirect.
I think the decscription here is inconsistent.

In the first paragraph it sounds like the wwwauth comes from the redirected-to URL, while in the last paragraph it sounds like it comes from the initial URL.

I think it would be good to word this more clearly.
Thanks
Michal
Previous: Matthew John Cheetham
Message 9 of 9 in “http: preserve wwwauth_headers across redirects”
  1. http: preserve wwwauth_headers across redirectsAaron Plattner, Aug 20, 2026
  2. Junio C HamanoAug 20, 2026
  3. Junio C HamanoAug 25, 2026
  4. Junio C HamanoNov 2, 2026
  5. Jeff KingNov 4, 2026
  6. Junio C HamanoNov 4, 2026
  7. Jeff KingNov 4, 2026
  8. Matthew John CheethamNov 4, 2026
  9. Michal SuchánekNov 4, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.