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

Return ETag on 304 as well. #160

Open
Dragomir-Ivanov opened this issue Oct 23, 2017 · 5 comments
Open

Return ETag on 304 as well. #160

Dragomir-Ivanov opened this issue Oct 23, 2017 · 5 comments

Comments

@Dragomir-Ivanov
Copy link
Contributor

Reading something about ETags, I found this:
http://www.bendeutsch.de/blog/The-difference-between-strong-and-weak-ETags

It seems that WebApp/Browser can supply multiple Etags on GET request for cached resources, so server must pick the right one, thus needs to return latest ETag on 304.

@Dragomir-Ivanov
Copy link
Contributor Author

I guess further down the line, we will need to add support for multiple ETags supplied to HEAD/GET. But this issue can wait though.
@smyrman Can you add Enhancement label.

@rs
Copy link
Owner

rs commented Oct 23, 2017

The thing is that sub-resource etags aren't current's one and an etag is associated with a specific path+query-string, so it should not be used to edit another resource.

@smyrman
Copy link
Collaborator

smyrman commented Oct 23, 2017

The link you posted is extremely useful @Dragomir-Ivanov.

The thing is that sub-resource etags aren't current's one and an etag is associated with a specific path+query-string, so it should not be used to edit another resource.

As I understand it from the link, it's not about sending multiple sub-resource E-tags, but about sending an E-tag for multiple versions of the same resource (path+query-string).

So a client (or browser) could theoretically cache up several versions of resource /a/1, and then ask the server:

  • Client: Does the version you got of /a/1 match E-Tag v1,v3 or v2? If not, please return it to me.
  • Server: 304 NotModified, and btw I got E-tag v3 over here.

@smyrman
Copy link
Collaborator

smyrman commented Oct 23, 2017

Btw, this is defiantly in the enchantment category. The main goal of supporting it would be out of correctness and browser compatibility - if this is something that a lot of browsers do.

@rs
Copy link
Owner

rs commented Oct 23, 2017

Oh yeah ok, got it. Yes absolutely, we should create a ticket for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants