HttpCompressionMiddleware: clarify internal comment

This commit is contained in:
Adrián Chaves 2022-06-30 17:10:59 +02:00
parent 4759c68193
commit 7ef061fc17
1 changed files with 2 additions and 2 deletions

View File

@ -70,8 +70,8 @@ class HttpCompressionMiddleware:
)
kwargs = dict(cls=respcls, body=decoded_body)
if issubclass(respcls, TextResponse):
# force recalculating the encoding until we make sure the
# responsetypes guessing is reliable
# Force recalculating the encoding based on the new,
# decoded (uncompressed) body.
kwargs['encoding'] = None
response = response.replace(**kwargs)
if not content_encoding: