mirror of https://github.com/python/cpython
Fix Issue8194 - Fix incompatible API change in the parse_respones for xmlrpclib.
This commit is contained in:
parent
705e8d882f
commit
d8e4edd5d2
|
@ -1446,10 +1446,15 @@ class Transport:
|
|||
|
||||
def parse_response(self, response):
|
||||
# read response data from httpresponse, and parse it
|
||||
|
||||
# Check for new http response object, else it is a file object
|
||||
if hasattr(response,'getheader'):
|
||||
if response.getheader("Content-Encoding", "") == "gzip":
|
||||
stream = GzipDecodedResponse(response)
|
||||
else:
|
||||
stream = response
|
||||
else:
|
||||
stream = response
|
||||
|
||||
p, u = self.getparser()
|
||||
|
||||
|
|
Loading…
Reference in New Issue