🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
1 messages
1 total messages Started by Michal Suchánek Wed, 04 Nov 2026 15:35
Re: [PATCH v2] http: preserve wwwauth_headers across redirects
#2327
Author: Michal Suchánek
Date: Wed, 04 Nov 2026 15:35
31 lines
13880 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads