1da3edd Handle compressed responses from Dogtag

1 file Authored by ftweedal 5 years ago, Committed by cheimes 5 years ago,
    Handle compressed responses from Dogtag
    
    We currently accept compressed responses for some Dogtag resources,
    via an 'Accept: gzip, deflate' header.  But we don't decompress the
    received data.  Inspect the response Content-Encoding header and
    decompress the response body according to its value.
    
    The `gzip.decompress` function is only available on Python 3.2 or
    later.  In earlier versions, it is necessary to use StringIO and
    treat the compressed data as a file.  This commit avoids this
    complexity.  Therefore it should only be included in Python 3 based
    releases.
    
    Fixes: https://pagure.io/freeipa/issue/7563
    Reviewed-By: Christian Heimes <cheimes@redhat.com>
    
        
file modified
+10 -1