kotx / render

Cloudflare Worker to proxy and cache requests to R2
MIT License
384 stars 85 forks source link

Etag needs to be quoted? #21

Closed vincentbernat closed 1 year ago

vincentbernat commented 1 year ago

Hey!

In src/index.ts, it is said that the R2 API requires etag to not be quoted. I don't find this information in the API documentation. Moreover, with Miniflare, etag should be left quoted, otherwise, there is no match.

kotx commented 1 year ago

Hi,

It seems that S3 request Etags never contain quotes, even if Etags in the HTTP response do. See below screenshot.

https://discord.com/channels/595317990191398933/940663374377783388/975306376203083796

https://user-images.githubusercontent.com/33439542/193421116-a927e071-8a5b-4383-a1dd-90367c78e66c.png

If Miniflare doesn't work with these then it's probably a bug since it should match the Cloudflare R2 API. Or R2 isn't implementing the S3 API correctly.

vincentbernat commented 1 year ago

Thanks. I have opened https://github.com/cloudflare/miniflare/issues/402.