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

Behave transparently on 304 if requester sets cache headers #6

Closed

Conversation

dontcallmedom
Copy link
Contributor

When the incoming request proxied by the library has If-Modified-Since or If-None-Match headers, we should assume the requester has a cache of its own and send back 304 responses as is.

When the incoming request proxied by the library has If-Modified-Since or If-None-Match headers, we should assume the requester has a cache of its own and send back 304 responses as is.
Copy link
Owner

@tidoust tidoust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll adjust the code because it misses something: when the refresh setting is set to never, if requester sends If-Modified-Since or If-None-Match and if version is cache matches the requested headers, the code should produce and return a 304 response.

In other words, the final 304 logic should rather be in readFromCache than right before it when a conditional request was made.

@tidoust
Copy link
Owner

tidoust commented Feb 4, 2022

@tidoust
Copy link
Owner

tidoust commented Feb 4, 2022

I cannot push to dontcallmedom/fetch-filecache-for-crawling, so made #7 instead, where I propose to continue the discussion and review :)

@tidoust tidoust closed this Feb 4, 2022
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

Successfully merging this pull request may close these issues.

2 participants