mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
Fix Issue8194 - Fix incompatible API change in the parse_respones for xmlrpclib.
This commit is contained in:
parent
24a0941a0f
commit
f34445f7bd
1 changed files with 6 additions and 2 deletions
|
|
@ -1297,10 +1297,14 @@ class Transport:
|
||||||
|
|
||||||
def parse_response(self, response):
|
def parse_response(self, response):
|
||||||
# read response data from httpresponse, and parse it
|
# read response data from httpresponse, and parse it
|
||||||
|
# Check for new http response object, otherwise it is a file object.
|
||||||
|
if hasattr(response, 'getheader'):
|
||||||
if response.getheader("Content-Encoding", "") == "gzip":
|
if response.getheader("Content-Encoding", "") == "gzip":
|
||||||
stream = GzipDecodedResponse(response)
|
stream = GzipDecodedResponse(response)
|
||||||
else:
|
else:
|
||||||
stream = response
|
stream = response
|
||||||
|
else:
|
||||||
|
stream = response
|
||||||
|
|
||||||
p, u = self.getparser()
|
p, u = self.getparser()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue