aiohttp
aiohttp copied to clipboard
Linux aiohttp server: transfer closed with 5297405952 bytes remaining to read
🐞 Describe the bug Try to download large file from aiohttp server
in handler:
response = web.FileResponse(
f'{config.storage_path}/{file_id}/{files[0]}',
headers={
'Content-Disposition': f'Attachment;filename={files[0]}',
}
)
return response
curl response:
$ curl -v http://192.168.0.119:8090/file/80cb86f8-a7cf-4bd5-9393-f97691a99dc4
* Trying 192.168.0.119...
* TCP_NODELAY set
* Connected to 192.168.0.119 (192.168.0.119) port 8090 (#0)
> GET /file/80cb86f8-a7cf-4bd5-9393-f97691a99dc4 HTTP/1.1
> Host: 192.168.0.119:8090
> User-Agent: curl/7.64.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Disposition: Attachment;filename=big_file_name.bin
< Content-Type: application/octet-stream
< Last-Modified: Thu, 18 Jun 2020 15:23:48 GMT
< Content-Length: 5297405952
< Accept-Ranges: bytes
< Date: Tue, 18 Aug 2020 07:41:56 GMT
< Server: Python/3.7 aiohttp/3.6.2
<
* transfer closed with 5297405952 bytes remaining to read
* Closing connection 0
curl: (18) transfer closed with 5297405952 bytes remaining to read
If server running on the macos - works fine If server running on the linux - transfer closed error If server running on the linux and filesize < 2Gb - works fine
Python/3.7 aiohttp/3.6.2
Hello @k4m454k!
Please give full code for a test case so we can dig into it.