Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[assets] confirm a weak but matching ETag #3485

Closed
wants to merge 2 commits into from

Conversation

das7pad
Copy link
Contributor

@das7pad das7pad commented Sep 7, 2019

When handling compression at the proxy server level, the client receives a weak ETag.
Weak ETags are prefixed with W/, e.g. W/"2.2.0".
Upon cache validation we should take care of these too.

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behaviour

Server responds with a 200 + full payload for a weak but matching etag.

New behaviour

Server responds with 304.

Other information (e.g. related issues)

See linked rfc https://tools.ietf.org/html/rfc7232#section-2.3

When handling compression at the proxy server level, the client receives a weak ETag.
Weak ETags are prefixed with `W/`, e.g. `W/"2.2.0"`.
Upon cache validation we should take care of these too.
@das7pad
Copy link
Contributor Author

das7pad commented Sep 21, 2019

Hello @darrachequesne,
is there any chance you can have a look at this PR?

@knoxcard
Copy link

@darrachequesne - are you the only person that has authoritative control of this project? That's a lot of power. :-)

@das7pad
Copy link
Contributor Author

das7pad commented May 7, 2020

Hi @darrachequesne!

Do you have a moment to take a look at this PR please?

Thanks in advance!

darrachequesne pushed a commit that referenced this pull request Jan 14, 2021
When handling compression at the proxy server level, the client receives a weak ETag.
Weak ETags are prefixed with `W/`, e.g. `W/"2.2.0"`.
Upon cache validation we should take care of these too.
darrachequesne pushed a commit that referenced this pull request Jan 15, 2021
When handling compression at the proxy server level, the client receives a weak ETag.
Weak ETags are prefixed with `W/`, e.g. `W/"2.2.0"`.
Upon cache validation we should take care of these too.

Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
@darrachequesne
Copy link
Member

Merged as 161091d (finally!) and included in socket.io@3.1.0. Thanks!

@darrachequesne darrachequesne added this to the 3.1.0 milestone Jan 15, 2021
@das7pad das7pad deleted the patch-1 branch February 9, 2021 12:38
This was referenced Mar 10, 2021
dzad pushed a commit to dzad/socket.io that referenced this pull request May 29, 2023
When handling compression at the proxy server level, the client receives a weak ETag.
Weak ETags are prefixed with `W/`, e.g. `W/"2.2.0"`.
Upon cache validation we should take care of these too.

Reference: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants