Skip to content

download of partial content is defeated by cachecontrol #327

Closed
@dimbleby

Description

@dimbleby

suppose some large file is in the cache already and we make a request for partial content with a Range header.

understanding that caching of such things is likely to go wrong we also include the header Cache-Control: no-cache.

this header succeeds in preventing cachecontrol from responding immediately from the cache - but does not stop it from going through

request.headers.update(self.controller.conditional_headers(request))
in which it unconditionally looks in the cache
resp = self._load_from_cache(request)
. The result is that cachecontrol adds an If-Modified-Since header to the request, with timestamp per what is in the cache.

but now the server sees the header on that request, knows that the file has not been modified recently, and returns 304. And now cachecontrol returns the entire file from its cache anyway, and not the partial content that the server would have given.

related-ish: #246 asks for cachecontrol to cache partial content. But this one reports that cachecontrol makes partial content not work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions