Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treq.auth.add_basic_auth agent mutates passed Headers #314

Closed
twm opened this issue Dec 26, 2020 · 0 comments · Fixed by #315
Closed

treq.auth.add_basic_auth agent mutates passed Headers #314

twm opened this issue Dec 26, 2020 · 0 comments · Fixed by #315
Assignees
Labels

Comments

@twm
Copy link
Contributor

twm commented Dec 26, 2020

The agent returned by treq.auth.add_basic_auth (and therefore treq.add_auth, and therefore treq.request()) mutates any Headers instance passed to it.

This is surprising. Doubly so, given that the wrapper agent's own implementation assumes that the agent it wraps doesn't mutate the headers.

@twm twm added the bug label Dec 26, 2020
@twm twm self-assigned this Dec 26, 2020
twm added a commit to twm/treq that referenced this issue Dec 26, 2020
Instead, copy and update.

Closes twisted#314.
@twm twm mentioned this issue Dec 26, 2020
@twm twm closed this as completed in #315 Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant