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

fix: stop :get, :delete parameters from bleeding into subsequent requests #388

Merged
merged 4 commits into from
Oct 10, 2022

Conversation

stevehobbsdev
Copy link
Contributor

@stevehobbsdev stevehobbsdev commented Oct 5, 2022

Changes

This change means that parameters supplied to a :get or :delete request in RestClient should no longer bleed into subsequent calls, as the shared headers hash is no longer mutated by these calls.

This fix has caused some of the integration test fixtures to no longer match requests being made, so these have also been updated.

References

Fixes #344

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change adds integration test coverage
  • This change has been tested on the latest version of Ruby

Checklist

@stevehobbsdev stevehobbsdev requested a review from a team as a code owner October 5, 2022 20:12
@stevehobbsdev stevehobbsdev marked this pull request as draft October 5, 2022 20:14
@stevehobbsdev
Copy link
Contributor Author

Moving to draft until I fix the build.

@stevehobbsdev stevehobbsdev marked this pull request as ready for review October 7, 2022 14:19
Copy link
Contributor

@Widcket Widcket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏼

@stevehobbsdev stevehobbsdev merged commit 1ff315b into master Oct 10, 2022
@stevehobbsdev stevehobbsdev deleted the sdk-3645/request-headers branch October 10, 2022 10:07
@stevehobbsdev stevehobbsdev mentioned this pull request Oct 10, 2022
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.

GET requests are mutating the shared headers causing parameters to leak into subsequent requests
2 participants