File tree Expand file tree Collapse file tree
storage/gcloud/aio/storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -625,10 +625,9 @@ async def _download(
625625 # argument is not passed, unless a user has explicitly disabled that
626626 # option at the session level in the case of aiohttp. We follow the
627627 # user setting by default (by passing None) and only explicitly disable
628- # it when we know that the object is not compressed (when the
629- # Accept-Encoding header is missing).
628+ # it when a caller explicitly requests a compressed payload.
630629 auto_decompress = None
631- if 'accept-encoding' not in {k .lower () for k in headers }:
630+ if 'accept-encoding' in {k .lower () for k in headers }:
632631 auto_decompress = False
633632
634633 s = AioSession (session ) if session else self .session
@@ -675,10 +674,9 @@ async def _download_stream(
675674 # argument is not passed, unless a user has explicitly disabled that
676675 # option at the session level in the case of aiohttp. We follow the
677676 # user setting by default (by passing None) and only explicitly disable
678- # it when we know that the object is not compressed (when the
679- # Accept-Encoding header is missing).
677+ # it when a caller explicitly requests a compressed payload.
680678 auto_decompress = None
681- if 'accept-encoding' not in {k .lower () for k in headers }:
679+ if 'accept-encoding' in {k .lower () for k in headers }:
682680 auto_decompress = False
683681
684682 s = AioSession (session ) if session else self .session
You can’t perform that action at this time.
0 commit comments