diff -r 97ab0ccac893 Lib/xmlrpc/client.py --- a/Lib/xmlrpc/client.py Wed Jan 06 11:37:52 2016 -0800 +++ b/Lib/xmlrpc/client.py Sat Jan 09 11:24:18 2016 +0100 @@ -1306,13 +1306,18 @@ p, u = self.getparser() + # around the 10 or 15Mb mark, some platforms + # begin to have problems (bug #792570) + max_chunk_size = 10 * 1024 * 1024 + chunk_size = 1024 while 1: - data = stream.read(1024) + data = stream.read(chunk_size) if not data: break if self.verbose: print("body:", repr(data)) p.feed(data) + chunk_size = min(chunk_size * 2, max_chunk_size) if stream is not response: stream.close()