Explicitly shutdown XML-RPC session for non-Keep Alive sessions
PATCH 1/1 Explicitly shutdown XML-RPC session for non-Keep Alive sessions
The follow patch explicitly shutdowns an XML-RPC session for non Keep-Alive sessions. This fixes the HVM domain creation problem (although I still am unsure whether we need to daemonize qemu-dm).
Regards,
Anthony Liguori
# HG changeset patch
# User Anthony Liguori <[email protected]>
# Node ID ddd4d7e3d79e8bf4999c820fdb5e003d31283d5f
# Parent 411a3c01bb40681731ad50fd3b8c5d7972baf36d
Make sure to explicitly close the connection if we're using HTTP/1.0. This shouldn't be needed but it appears to be necessary as the Python client just does a wfile.read() instead of only reading the reported Content-Length.
tools/python/xen/util/xmlrpclib2.py +2 -2
@@ -58,8 +58,6 @@ class XMLRPCRequestHandler(SimpleXMLRPCR # propagate so that it shows up in the Xend debug logs # 2) we don't bother checking for a _dispatch function since we don't # use one - # 3) we never shutdown the connection. This appears to be a bug in - # SimpleXMLRPCServer.py as it breaks HTTP Keep-Alive def do_POST(self): data = self.rfile.read(int(self.headers["content-length"])) rsp = self.server._marshaled_dispatch(data)
@@ -71,6 +69,8 @@ class XMLRPCRequestHandler(SimpleXMLRPCR self.wfile.write(rsp) self.wfile.flush() + if self.close_connection == 1: + self.connection.shutdown(1) class HTTPUnixConnection(HTTPConnection): def connect(self):
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel