You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Don't store responses from uncacheable range requests.
Previously, this library would correctly detect range requests and not
serve cached responses. However, it would _store_ responses to partial
range requests, and then incorrectly serve them for non-range requests,
which would result in partial response provided when a full response is
expected.
This change fixes that. It tracks all uncacheable requests with a
single boolean and does not serve, not store responses from cache in
those cases.
In theory, it is possible to cache (to various degree) or serve from
cache requests with range, but that is currently not implemented by
this library and the current behavior was resulting in incorrect
responses. This commit focuses on fixing invalid behavior first.
Optional followup PRs can focus on optimizations by adding support for
storing/serving range requests/responses. However, the implementation
may not be trivial, and there may be other trade-offs at play.
0 commit comments