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

Centralize control over Range headers in the range VDP #3289

Closed

Conversation

nigoroll
Copy link
Member

This is an alternative approach to the ideas recorded in #3251: By centralizing control over the range-request related headers, range handling can be disabled by removing the range vdp from the response filters.

By default, we now always push the range VDP as long as http_range_support is on. If that is the case, behaviour is just the same as before, but the Accept-Ranges response header is now set in the range VDP's init callback.

The difference is that, if the range vdp is removed from the filters, no Accept-Ranges header will be sent.

Note that the range vdp will not be active during body delivery if it only sets Accept-Ranges (by returning 1 from the init callback).

Fixes #3251

This is an alternative approach to the ideas recorded in varnishcache#3251: By
centralizing control over the Range-Request related headers, range
handling can be disabled by removing the range vdp from the response
filters.

By default, we now always push the range VDP as long as
http_range_support is on. If that is the case, behaviour is just the
same as before, but the Accept-Ranges response header is now set in the
range VDP's init callback.

The difference is that, if the range vdp is removed from the filters, no
Accept-Ranges header will be sent.

Note that if the range will not be active during delivery if it only
sets Accept-Ranges (by returning 1 from the init callback).

Fixes varnishcache#3251
@nigoroll
Copy link
Member Author

veto'ed by @bsdphk during bugwash. He will come up with a better suggestion in #3251

@nigoroll nigoroll closed this Apr 20, 2020
@bsdphk
Copy link
Contributor

bsdphk commented Apr 20, 2020

This is a Firm no.

See #3251 for full comments.

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.

We set Accept-Range on pass, is that OK ?
2 participants