From: "Michal Suchánek" <msuchanek@suse.de>
To: Jeff King <peff@peff.net>
Cc: Aaron Plattner <aplattner@nvidia.com>,
Matthew John Cheetham <mjcheetham@outlook.com>,
git@vger.kernel.org, Rahul Rameshbabu <rrameshbabu@nvidia.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2] http: preserve wwwauth_headers across redirects
Date: Wed, 4 Nov 2026 16:35:56 +0100 [thread overview]
Message-ID: <autQ3CB9bD9IIpXp@kunlun.suse.cz> (raw)
In-Reply-To: <20261104062423.GA1763458@coredump.intra.peff.net>
Hello,
On Wed, Nov 04, 2026 at 01:24:23AM -0500, Jeff King wrote:
> 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
prev parent reply other threads:[~2026-11-04 15:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 3:21 [PATCH v2] http: preserve wwwauth_headers across redirects Aaron Plattner
2026-08-20 15:26 ` Junio C Hamano
2026-08-25 0:40 ` Junio C Hamano
2026-11-02 8:51 ` Junio C Hamano
2026-11-04 6:27 ` Jeff King
2026-11-04 18:31 ` Junio C Hamano
2026-11-04 6:24 ` Jeff King
2026-11-04 9:34 ` Matthew John Cheetham
2026-11-04 15:35 ` Michal Suchánek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=autQ3CB9bD9IIpXp@kunlun.suse.cz \
--to=msuchanek@suse.de \
--cc=aplattner@nvidia.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mjcheetham@outlook.com \
--cc=peff@peff.net \
--cc=rrameshbabu@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.