'When we perform a request to a site which returns gzip encoded data, the
ExtendedUrllib will automatically decode that and set it as the body,
this test makes sure that we\'re also changing the header to reflect
that change.
Not doing this will make the browser (or any other http client) fail to
decode the body (it will try to gunzip it and fail).'

def test_proxy_gzip_encoding(self):

    url = get_sqlmap_testenv_http('/sqlmap/mysql/get_int.php?id=1')
    resp = self.proxy_opener.open(url)
    headers = dict(resp.headers)
    content_encoding = headers.get('content-encoding')
    self.assertIn('luther', resp.read())
    self.assertEqual('identity', content_encoding)
