fix(storage): avoid stomping over session-level auto_decompress value#718
Conversation
| # is present, then the client will handle the decompression | ||
| auto_decompress = 'accept-encoding' not in {k.lower() for k in headers} | ||
| auto_decompress = None # inherit the Session default setting | ||
| if 'accept-encoding' not in {k.lower() for k in headers}: |
There was a problem hiding this comment.
| if 'accept-encoding' not in {k.lower() for k in headers}: | |
| if 'accept-encoding' in {k.lower() for k in headers}: |
There was a problem hiding this comment.
I believe we want want Kevin has here. If 'accept-encoding' in {k.lower() for k in headers} is True, that means that the session passes auto_decompress value implicitly in session, and we want None. We only want to set auto_decompress if 'accept-encoding' in {k.lower() for k in headers} is False, that is 'accept-encoding' is not in the headers.
eddiedialpad
left a comment
There was a problem hiding this comment.
approved: avoid overriding auto_decompress value
| # is present, then the client will handle the decompression | ||
| auto_decompress = 'accept-encoding' not in {k.lower() for k in headers} | ||
| auto_decompress = None # inherit the Session default setting | ||
| if 'accept-encoding' not in {k.lower() for k in headers}: |
There was a problem hiding this comment.
I believe we want want Kevin has here. If 'accept-encoding' in {k.lower() for k in headers} is True, that means that the session passes auto_decompress value implicitly in session, and we want None. We only want to set auto_decompress if 'accept-encoding' in {k.lower() for k in headers} is False, that is 'accept-encoding' is not in the headers.
Summary
Blocked on #717