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

Support weak (W/) Etags/If-None-Match header #747

Open
cdrini opened this issue Nov 11, 2022 · 0 comments · May be fixed by #748
Open

Support weak (W/) Etags/If-None-Match header #747

cdrini opened this issue Nov 11, 2022 · 0 comments · May be fixed by #748

Comments

@cdrini
Copy link

cdrini commented Nov 11, 2022

Etags/If-None-Match can be optionally prefixed by W/ to denote a "weak validator" according to MDN. This flag denotes that it is approximately identical, but not byte-identical. MDN suggests W/ shouldn't match for byte ranges. Presumably it should match for anything else though?

Update http.modified to handle W/.

MDN states:

If-None-Match
Succeeds if the ETag of the distant resource is different to each listed in this header. By default, unless the etag is prefixed with 'W/', it performs a strong validation.

So if the requester etag is weak, then if the page etag can be weak or strong. If it's strong, then the page's etag must also be strong. I believe that's the correct interpretation.

@cdrini cdrini linked a pull request Nov 11, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants