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 conditional requirements (e.g. If-Match) #22

Open
calvinrp opened this issue May 4, 2024 · 3 comments
Open

Add conditional requirements (e.g. If-Match) #22

calvinrp opened this issue May 4, 2024 · 3 comments

Comments

@calvinrp
Copy link

calvinrp commented May 4, 2024

It is common to use conditional headers in blob store API calls to achieve transactional consistency. Operations fail if the condition is not met.

Common ones:

  • If-Modified-Since
  • If-Unmodified-Since
  • If-Match
  • If-None-Match

For example, see Azure Blob Storage docs.

GET requests would return an Etag value that could be used as If-Match condition.

Any objections to a PR?

@thomastaylor312
Copy link
Collaborator

Are there similar headers for other blobstore providers? I'm good with a PR, especially if you can include the links to multiple providers using this (which I think they do)

@calvinrp
Copy link
Author

GCP Storage
R2 and headers

S3 has on GET but doesn't appear on the PUT?

@thomastaylor312
Copy link
Collaborator

Yep, that looks good to me. Feel free to open a PR

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

No branches or pull requests

2 participants