From: Anthony Liguori <aliguori@us.ibm.com>
To: xen-devel <xen-devel@lists.xensource.com>,
Ewan Mellor <ewan@xensource.com>
Subject: [PATCH] Explicitly shutdown XML-RPC session for non-Keep Alive sessions
Date: Thu, 22 Jun 2006 09:01:54 -0500 [thread overview]
Message-ID: <449AA2D2.4010106@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]
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
[-- Attachment #2: xend-keep-alive-hvm.diff --]
[-- Type: text/plain, Size: 1435 bytes --]
# HG changeset patch
# User Anthony Liguori <anthony@codemonkey.ws>
# 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.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff -r 411a3c01bb40 -r ddd4d7e3d79e tools/python/xen/util/xmlrpclib2.py
--- a/tools/python/xen/util/xmlrpclib2.py Tue Jun 20 18:51:46 2006 +0100
+++ b/tools/python/xen/util/xmlrpclib2.py Wed Jun 21 16:47:48 2006 -0500
@@ -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):
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2006-06-22 14:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=449AA2D2.4010106@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=ewan@xensource.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.