Skip to content

Commit

Permalink
decompress bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jstzwj committed Sep 27, 2024
1 parent 36c32d0 commit 8ee260c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions olah/proxy/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ async def _get_file_range_from_remote(
yield raw_chunk
chunk_bytes += len(raw_chunk)

final_data = decompress_data(raw_data, response.headers.get("content-encoding", None))
chunk_bytes = len(final_data)
yield final_data
if "content-encoding" in response.headers:
final_data = decompress_data(raw_data, response.headers.get("content-encoding", None))
chunk_bytes = len(final_data)
yield final_data
if "content-length" in response.headers:
if "content-encoding" in response.headers:
response_content_length = len(final_data)
Expand Down

0 comments on commit 8ee260c

Please sign in to comment.