(self, response)
| 1301 | # @return Response tuple and target method. |
| 1302 | |
| 1303 | def parse_response(self, response): |
| 1304 | # read response data from httpresponse, and parse it |
| 1305 | # Check for new http response object, otherwise it is a file object. |
| 1306 | if hasattr(response, 'getheader'): |
| 1307 | if response.getheader("Content-Encoding", "") == "gzip": |
| 1308 | stream = GzipDecodedResponse(response) |
| 1309 | else: |
| 1310 | stream = response |
| 1311 | else: |
| 1312 | stream = response |
| 1313 | |
| 1314 | p, u = self.getparser() |
| 1315 | |
| 1316 | while data := stream.read(1024): |
| 1317 | if self.verbose: |
| 1318 | print("body:", repr(data)) |
| 1319 | p.feed(data) |
| 1320 | |
| 1321 | if stream is not response: |
| 1322 | stream.close() |
| 1323 | p.close() |
| 1324 | |
| 1325 | return u.close() |
| 1326 | |
| 1327 | ## |
| 1328 | # Standard transport class for XML-RPC over HTTPS. |
no test coverage detected