[freeipa PR#1974][opened] Handle compressed responses from Dogtag
by frasertweedale
URL: https://github.com/freeipa/freeipa/pull/1974
Author: frasertweedale
Title: #1974: Handle compressed responses from Dogtag
Action: opened
PR body:
"""
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
"""
To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/1974/head:pr1974
git checkout pr1974
4 years, 10 months