mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
fixing cacheable_response? to exclude headers and freshness
it's called with a fresh response already
This commit is contained in:
parent
0d23c464f5
commit
6bd3c15384
@ -34,9 +34,7 @@ module HTTPX
|
||||
# directive prohibits caching. However, a cache that does not support
|
||||
# the Range and Content-Range headers MUST NOT cache 206 (Partial
|
||||
# Content) responses.
|
||||
response.status != 206 && (
|
||||
response.headers.key?("etag") || response.headers.key?("last-modified") || response.fresh?
|
||||
)
|
||||
response.status != 206
|
||||
end
|
||||
|
||||
def cached_response?(response)
|
||||
|
Loading…
x
Reference in New Issue
Block a user