We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc6a2ca commit be364b6Copy full SHA for be364b6
mechanize/_gzip.py
@@ -185,10 +185,10 @@ def __copy__(self):
185
def http_request(self, request):
186
if self.request_gzip:
187
existing = [
188
- x.strip()
+ x.strip().lower()
189
for x in request.get_header('Accept-Encoding', '').split(',')
190
]
191
- if sum('gzip' in x for x in existing) < 1:
+ if 'gzip' not in existing:
192
existing.append('gzip')
193
request.add_header("Accept-Encoding",
194
', '.join(filter(None, existing)))
0 commit comments