-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Set Accept-Ranges: none
header when compressing responses
#229
Comments
palant
changed the title
Set
Set May 7, 2024
Accept-Ranges: none
when compressing responsesAccept-Ranges: none
header when compressing responses
eaufavor
added
bug
Something isn't working
and removed
enhancement
New feature or request
labels
May 10, 2024
andrewhavck
added
WIP
We are working on this feature internally
Accepted
This change is accepted by us and merged to our internal repo
and removed
WIP
We are working on this feature internally
labels
Jun 8, 2024
palant
added a commit
to palant/pingora
that referenced
this issue
Jun 15, 2024
…en compression is enabled
@andrewhavck Yes, I got that. I updated #286 to account for the recent changes. Note that b8ec7aa (correctly) applies to the decompression scenario as well, but it only tests the compression one. My pull request tests both. |
Closing as this is largely resolved. |
johnhurt
pushed a commit
that referenced
this issue
Aug 23, 2024
…abled --- Merge branch 'main' into compression-headers --- Updated “compression enabled” check for recent changes --- Fixed clippy warning --- Reverted changes related to Accept-Ranges header --- Handle multiple Vary headers --- Merged main branch Includes-commit: 4ea0c3f Includes-commit: 78f09b2 Includes-commit: 973d596 Includes-commit: 9f82578 Includes-commit: d6e94c9 Includes-commit: e88fdb8 Includes-commit: f647f04 Replicated-from: #286
johnhurt
pushed a commit
that referenced
this issue
Aug 23, 2024
…abled --- Merge branch 'main' into compression-headers --- Updated “compression enabled” check for recent changes --- Fixed clippy warning --- Reverted changes related to Accept-Ranges header --- Handle multiple Vary headers --- Merged main branch Includes-commit: 4ea0c3f Includes-commit: 78f09b2 Includes-commit: 973d596 Includes-commit: 9f82578 Includes-commit: d6e94c9 Includes-commit: e88fdb8 Includes-commit: f647f04 Replicated-from: #286
escoffier
pushed a commit
to escoffier/pingora
that referenced
this issue
Sep 6, 2024
…en compression is enabled --- Merge branch 'main' into compression-headers --- Updated “compression enabled” check for recent changes --- Fixed clippy warning --- Reverted changes related to Accept-Ranges header --- Handle multiple Vary headers --- Merged main branch Includes-commit: 4ea0c3f Includes-commit: 78f09b2 Includes-commit: 973d596 Includes-commit: 9f82578 Includes-commit: d6e94c9 Includes-commit: e88fdb8 Includes-commit: f647f04 Replicated-from: cloudflare#286
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the problem your feature solves, or the need it fulfills?
When adjusting response headers,
ResponseCompressionCtx
will currently remove theContent-Length
header as the old header does not apply. A potentially presentAccept-Ranges: bytes
header is left untouched however, even though ranged requests no longer make sense.Describe the solution you'd like
Call
resp.insert_header(&ACCEPT_RANGES, HeaderValue::from_static("none"))
when compressing. This will both overwrite any existingAccept-Ranges
header and explicitly indicate to the client that ranged requests are unsupported.Describe alternatives you've considered
N/A
Additional context
Accept-Ranges header spec
The text was updated successfully, but these errors were encountered: