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

Add option to clean etag before PATCH and POST #275

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

TyphonHill
Copy link
Contributor

While using this client with Intel machines, we came across an issue where PATCH and POST requests were failing due to unmatched etags.
Some vendors surround header etag with quotes, which need to be cleaned before sending a patch.

This MR simply adds an option to trim quotes from the etag before it is added to the header of the request

@stmcginnis
Copy link
Owner

Any idea if it's safe to just always do this?

@TyphonHill
Copy link
Contributor Author

Don't think it's safe to always have it enabled. This issue only applies to some vendors. In our case we came across it when dealing with some Intel machines. That's why I added a flag.
A second option is to simply not add the etag to the header using "If-Match", but that would essentially remove support for etags

Copy link
Owner

@stmcginnis stmcginnis left a comment

Choose a reason for hiding this comment

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

Seems reasonable - thanks!

@stmcginnis stmcginnis merged commit db55696 into stmcginnis:main Sep 15, 2023
2 checks passed
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.

2 participants