Disable caching for binary download (#3054)

This commit is contained in:
Ohad Lutzky 2022-01-16 22:14:45 +00:00 committed by Jesse Hills
parent d3fda37615
commit d274545e77
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -445,6 +445,7 @@ class DownloadBinaryRequestHandler(BaseHandler):
self.set_header("Content-Type", "application/octet-stream") self.set_header("Content-Type", "application/octet-stream")
self.set_header("Content-Disposition", f'attachment; filename="{filename}"') self.set_header("Content-Disposition", f'attachment; filename="{filename}"')
self.set_header("Cache-Control", "no-cache")
if not Path(path).is_file(): if not Path(path).is_file():
self.send_error(404) self.send_error(404)
return return