kopia lustrzana https://github.com/simonw/datasette
transfer-encoding: chunked for DB downloads, refs #749
This should get >32MB downloads working on Cloud Run.pull/1128/head
rodzic
a970276b99
commit
88ac538b41
|
@ -169,6 +169,7 @@ class DatabaseDownload(DataView):
|
|||
headers = {}
|
||||
if self.ds.cors:
|
||||
headers["Access-Control-Allow-Origin"] = "*"
|
||||
headers["Transfer-Encoding"] = "chunked"
|
||||
return AsgiFileDownload(
|
||||
filepath,
|
||||
filename=os.path.basename(filepath),
|
||||
|
|
|
@ -1028,6 +1028,7 @@ def test_database_download_for_immutable():
|
|||
download_response.headers["content-disposition"]
|
||||
== 'attachment; filename="fixtures.db"'
|
||||
)
|
||||
assert download_response.headers["transfer-encoding"] == "chunked"
|
||||
|
||||
|
||||
def test_database_download_disallowed_for_mutable(app_client):
|
||||
|
|
Ładowanie…
Reference in New Issue