1
0
mirror of https://github.com/django/django.git synced 2025-08-21 01:09:13 +00:00

Fixed typo in django/middleware/gzip.py.

This commit is contained in:
Mohamed Amine Mahmoud 2025-07-23 14:54:10 +01:00 committed by Sarah Boyce
parent d90bea1b06
commit 485f483d49

View File

@ -34,10 +34,10 @@ class GZipMiddleware(MiddlewareMixin):
if response.is_async: if response.is_async:
# pull to lexical scope to capture fixed reference in case # pull to lexical scope to capture fixed reference in case
# streaming_content is set again later. # streaming_content is set again later.
orignal_iterator = response.streaming_content original_iterator = response.streaming_content
async def gzip_wrapper(): async def gzip_wrapper():
async for chunk in orignal_iterator: async for chunk in original_iterator:
yield compress_string( yield compress_string(
chunk, chunk,
max_random_bytes=self.max_random_bytes, max_random_bytes=self.max_random_bytes,