8000 HTTP: added "not_modified_check" directive. by HanadaLee · Pull Request #658 · nginx/nginx · GitHub
[go: up one dir, main page]

Skip to content

HTTP: added "not_modified_check" directive. #658

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HanadaLee
Copy link

This directive establishes four distinct modes for managing 304 responses, which determine how the If-None-Match and If-Modified-Since headers are evaluated.

When the directive parameter is set to off, the response is always treated as modified, regardless of the headers.

When set to any, a 304 response is returned if either the If-Modified-Since or If-None-Match condition is satisfied.

When set to strict, a 304 response is returned only if both the If-Modified-Since and If-None-Match conditions are met. This is the default setting and reflects the traditional behavior of NGINX.

When set to prefer_if_none_match, it will follow RFC 9110, Section 13.1.3. In this mode, if the If-None-Match header is present, the If-Modified-Since header is ignored.

Proposed changes

Fixes #652

@HanadaLee HanadaLee changed the title Core: added "not_modified_check" directive. HTTP: added "not_modified_check" directive. Apr 26, 2025
This directive establishes four distinct modes for managing 304 responses,
which determine how the If-None-Match and If-Modified-Since headers are
evaluated.

When the directive parameter is set to off, the response is always treated as
modified, regardless of the headers.

When set to any, a 304 response is returned if either the If-Modified-Since
or If-None-Match condition is satisfied.

When set to strict, a 304 response is returned only if both the
If-Modified-Since and If-None-Match conditions are met.
This is the default setting and reflects the traditional behavior of NGINX.

When set to prefer_if_none_match, it will follow RFC 9110, Section 13.1.3.
In this mode, if the If-None-Match header is present, the If-Modified-Since
header is ignored.
@HanadaLee HanadaLee force-pushed the not_modified_check branch from 7dbb2a1 to 977d853 Compare April 26, 2025 16:01
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.

nginx seemingly ignoring If-None-Match in the presence of If-Modified-Since in violation of specs
1 participant
0