Index: Lib/BaseHTTPServer.py =================================================================== --- Lib/BaseHTTPServer.py (revision 73271) +++ Lib/BaseHTTPServer.py (working copy) @@ -321,6 +321,7 @@ return method = getattr(self, mname) method() + self.wfile.flush() #actually send the response if not already done. def handle(self): """Handle multiple requests if necessary.""" Index: Lib/DocXMLRPCServer.py =================================================================== --- Lib/DocXMLRPCServer.py (revision 73271) +++ Lib/DocXMLRPCServer.py (working copy) @@ -240,10 +240,6 @@ self.end_headers() self.wfile.write(response) - # shut down the connection - self.wfile.flush() - self.connection.shutdown(1) - class DocXMLRPCServer( SimpleXMLRPCServer, XMLRPCDocGenerator): """XML-RPC and HTML documentation server. Index: Lib/SimpleXMLRPCServer.py =================================================================== --- Lib/SimpleXMLRPCServer.py (revision 73271) +++ Lib/SimpleXMLRPCServer.py (working copy) @@ -490,10 +490,6 @@ self.end_headers() self.wfile.write(response) - # shut down the connection - self.wfile.flush() - self.connection.shutdown(1) - def report_404 (self): # Report a 404 error self.send_response(404) @@ -502,9 +498,6 @@ self.send_header("Content-length", str(len(response))) self.end_headers() self.wfile.write(response) - # shut down the connection - self.wfile.flush() - self.connection.shutdown(1) def log_request(self, code='-', size='-'): """Selectively log an accepted request.""" @@ -557,7 +550,7 @@ response = self._marshaled_dispatch(request_text) - print 'Content-Type: text/xml' + print 'Content-Type: text/xml' print 'Content-Length: %d' % len(response) print sys.stdout.write(response)