This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-unstable] [TOOLS] Make sure to explicitly close the

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [TOOLS] Make sure to explicitly close the connection if we're using HTTP/1.0. This
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 23 Jun 2006 12:40:27 +0000
Delivery-date: Fri, 23 Jun 2006 05:42:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID dab24595e52989a5c23471cdb9908e38b2d087b9
# Parent  c2e8e9b1e19242477de1a0b78bdc64b6e08da202
[TOOLS] Make sure to explicitly close the connection if we're using HTTP/1.0.  
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.

Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
 tools/python/xen/util/xmlrpclib2.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r c2e8e9b1e192 -r dab24595e529 tools/python/xen/util/xmlrpclib2.py
--- a/tools/python/xen/util/xmlrpclib2.py       Thu Jun 22 15:09:48 2006 +0100
+++ b/tools/python/xen/util/xmlrpclib2.py       Thu Jun 22 15:10:48 2006 +0100
@@ -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
+        if self.close_connection == 1:
+            self.connection.shutdown(1)
 class HTTPUnixConnection(HTTPConnection):
     def connect(self):

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [TOOLS] Make sure to explicitly close the connection if we're using HTTP/1.0. This, Xen patchbot-unstable <=