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

Add the conditional response with cache entity tag #14

Merged
merged 1 commit into from
Apr 11, 2024

Conversation

u5surf
Copy link
Contributor

@u5surf u5surf commented Mar 30, 2024

Nginx has the same mechanism can reply the 304 response using cache.

https://github.com/nginx/nginx/blob/e3207a17f084c9eb7905ca0f2cfdb1df088fd165/src/http/ngx_http_upstream.c#L6023-L-6043

https://github.com/nginx/nginx/blob/e3207a17f084c9eb7905ca0f2cfdb1df088fd165/src/http/modules/ngx_http_not_modified_filter_module.c#L86-L105

* We can reply 304 response with cache to possible
to reduce body response if cache entity tag is
equivalent to client side one.
* We can do that to use the request with If-None-Match.
* https://www.rfc-editor.org/rfc/rfc7232#section-2.3
@kevinmcconnell
Copy link
Collaborator

Thanks @u5surf, this looks great 👍

@kevinmcconnell kevinmcconnell merged commit 573accc into basecamp:main Apr 11, 2024
1 check passed
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