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

Vary logic appears to be incorrect. #2

Open
sporkmonger opened this issue May 14, 2012 · 0 comments
Open

Vary logic appears to be incorrect. #2

sporkmonger opened this issue May 14, 2012 · 0 comments

Comments

@sporkmonger
Copy link

I'm pretty sure you're supposed to build the lookup key from the request headers specified in the Vary response header. So if the response indicated Vary: Accept-Encoding, Accept-Language you wouldn't actually store [ 'Accept-Encoding', 'Accept-Language' ] in your data structure, I think you're supposed to store the tuple of [req.path, "gzip,deflate,sdch", "en-US,en;q=0.8"] (assuming Chrome user agent used in request). And you probably need to handle Vary: * specially.

Ideally though, as mentioned in issue #1, you'd just buffer the content and calculate the ETag directly, in which case the Vary header should be irrelevant since you're not actually acting as a cache. (i.e., if issue #1 is resolved by calculating ETag every single time, this issue becomes invalid.)

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

1 participant