Repository navigation
Conversation
Endpoint.set_parameters merged http_options into the request parameters with a shallow update and then wrote x-tableau-auth, content-type and User-Agent into parameters["headers"], which was the same dict object the caller passed as http_options["headers"]. The session token stayed in the caller's dict and was sent on later requests, including sign-in to a different Server built from the same options, and Server objects sharing one dict overwrote each other's token. Copy the headers dict per request before adding headers, so the caller's dict and other Server objects are never modified. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Endpoint.set_parametersmergeshttp_optionswith a shallow update and then addsx-tableau-auth,content-typeandUser-Agenttoparameters["headers"], which is the caller's ownhttp_options["headers"]dict. The session token stays in that dict and is sent on later requests: after sign-out, and on sign-in to anotherServerbuilt from the same options.Serverobjects sharing one dict also overwrite each other's token.Behavior change
Headers are copied per request, so the caller's dict and other
Serverobjects are never modified and auth headers are not shared betweenServerobjects. Requests send the same headers as before. Code that read the token back fromhttp_options["headers"](orserver.http_options["headers"]) will not find it there; read it fromserver.auth_token.🤖 Generated with Claude Code