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

etags should be in double quotes #2

Closed
bewinsnw opened this issue May 24, 2024 · 3 comments
Closed

etags should be in double quotes #2

bewinsnw opened this issue May 24, 2024 · 3 comments

Comments

@bewinsnw
Copy link

minor nit:

text_hash = hashlib.sha256(resource.text.encode('UTF-8')).hexdigest()[:12]

See the spec:
https://www.rfc-editor.org/rfc/rfc9110#field.etag

I've literally once, ever, seen this be an issue, with virgin media's web-to-cable-tv caches back in 2001. But that client just dropped responses with misformatted etags on the floor.

@pelson
Copy link
Contributor

pelson commented Jun 28, 2024

Turns out this was a problem with starlette too... recently fixed (encode/starlette#2298 (comment)).

This will be fixed in >v0.5.0 (and >0.5.0 of simple-repository core also)

@pelson
Copy link
Contributor

pelson commented Jun 29, 2024

Fixed in v0.6.0. Thanks for the nit - it is always good to improve this stuff.

@pelson pelson closed this as completed Jun 29, 2024
@pelson
Copy link
Contributor

pelson commented Jun 29, 2024

Note that it is also necessary to update simple-repository at the same time (to v0.7.0) to have local files have correct etags.

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