Skip to content

fix: spnego client reqs forever incrementing#561

Open
gycc7253 wants to merge 1 commit intojcmturner:masterfrom
gycc7253:spnego.fix-redirect-reqs
Open

fix: spnego client reqs forever incrementing#561
gycc7253 wants to merge 1 commit intojcmturner:masterfrom
gycc7253:spnego.fix-redirect-reqs

Conversation

@gycc7253
Copy link

Background:

Currently, spnego Client maintains a list of redirect requests in a slice of reqs that is only incrementing and never cleared, in Client.Do() function, if reqs > 10, it return resp, errors.New("stopped after 10 redirects").

Problem:

This will lead to a consequence that the client will always fail to handle redirect after it has accumutively handled more than 10 redirects since its instantiation.

Solution:

Clears this reqs list when a request has received a response that is neither a redirect, nor unauthorized response that requires negotiation.

@gycc7253 gycc7253 force-pushed the spnego.fix-redirect-reqs branch from 8671aae to a7514ee Compare September 26, 2025 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant