diff options
| author | Andrew Godwin | 2022-12-17 12:16:37 -0700 | 
|---|---|---|
| committer | Andrew Godwin | 2022-12-17 12:16:37 -0700 | 
| commit | 256ebe56d5f9f6d8e18ae61e9406a8d33ed4b1a1 (patch) | |
| tree | d12d2493f22f01d15610bfee0242daada45e44f4 /core | |
| parent | 5bbcc0f6c3bef33e31d6d55c3a171245428434de (diff) | |
| download | takahe-256ebe56d5f9f6d8e18ae61e9406a8d33ed4b1a1.tar.gz takahe-256ebe56d5f9f6d8e18ae61e9406a8d33ed4b1a1.tar.bz2 takahe-256ebe56d5f9f6d8e18ae61e9406a8d33ed4b1a1.zip  | |
Don't download files with no content-length
Diffstat (limited to 'core')
| -rw-r--r-- | core/files.py | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/core/files.py b/core/files.py index 3ef79aa..a3ac813 100644 --- a/core/files.py +++ b/core/files.py @@ -58,7 +58,7 @@ async def get_remote_file(                  try:                      content_length = int(stream.headers["content-length"])                      allow_download = content_length <= max_size -                except TypeError: +                except (KeyError, TypeError):                      pass              if allow_download:                  file = ContentFile(await stream.aread(), name=url)  | 
