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

builtin.vcl: Delete Content-Range header where it has no meaning #4137

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

nigoroll
Copy link
Member

Since 4ab1100 (see also #3246), we fail backend responses with an unexpected Content-Range.

Yet RFC9110 states:

The Content-Range header field has no meaning for status codes that do not explicitly describe its semantic.

The semantic is described for status codes 206 and 416, so the obvious implementation change would be for core code to only consider Content-Range for these status codes.

But there might be scenarios where a stricter-than-RFC check is intended, so we keep that in core code and change builtin.vcl to remove the header where it has no semantic.

@nigoroll nigoroll force-pushed the builtin_neuter_content-range branch from 82aa447 to bb29f4b Compare July 31, 2024 18:47
Since 4ab1100 (see also varnishcache#3246), we fail backend
responses with an unexpected Content-Range.

Yet RFC9110 states:

	The Content-Range header field has no meaning for status codes that do
	not explicitly describe its semantic.

	https://www.rfc-editor.org/rfc/rfc9110.html#section-14.4

The semantic is described for status codes 206 and 416, so the obvious
implementation change would be for core code to only consider Content-Range for
these status codes.

But there might be scenarios where a stricter-than-RFC check is intended, so we
keep that in core code and change builtin.vcl to remove the header where it has
no semantic.
@nigoroll nigoroll force-pushed the builtin_neuter_content-range branch from bb29f4b to 477a5dd Compare August 12, 2024 14:07
@nigoroll nigoroll merged commit 477a5dd into varnishcache:master Aug 12, 2024
1 of 9 checks passed
@nigoroll nigoroll deleted the builtin_neuter_content-range branch August 12, 2024 14:07
dridi added a commit that referenced this pull request Sep 27, 2024
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.

1 participant