WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH] CA-24629: xapi does not close the connection after eit

To: Xen-API <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] [PATCH] CA-24629: xapi does not close the connection after either /pool/xmldbdump or /export_metadata complete
From: Ewan Mellor <ewan.mellor@xxxxxxxxxxxxx>
Date: Fri, 5 Mar 2010 09:38:43 +0000
Delivery-date: Fri, 05 Mar 2010 01:38:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
CA-24629: xapi does not close the connection after either /pool/xmldbdump or /ex
port_metadata complete

Force the connection to close on the two URL handlers mentioned.  These
stream straight to the HTTP output, without using Content-length, and so
are required to close the connection, even when using HTTP/1.1.

Signed-off-by: Ewan Mellor <ewan.mellor@xxxxxxxxxxxxx>

diff -r 7912e1d8540c -r 415b64e0da07 ocaml/xapi/export.ml
--- a/ocaml/xapi/export.ml      Fri Mar 05 01:32:11 2010 +0000
+++ b/ocaml/xapi/export.ml      Fri Mar 05 09:30:31 2010 +0000
@@ -351,6 +351,7 @@

 let metadata_handler (req: request) s =
        debug "metadata_handler called";
+       req.close := true;

        (* Xapi_http.with_context always completes the task at the end *)
        Xapi_http.with_context "VM.export_metadata" req s
diff -r 7912e1d8540c -r 415b64e0da07 ocaml/xapi/pool_db_backup.ml
--- a/ocaml/xapi/pool_db_backup.ml      Fri Mar 05 01:32:11 2010 +0000
+++ b/ocaml/xapi/pool_db_backup.ml      Fri Mar 05 09:30:31 2010 +0000
@@ -163,6 +163,7 @@
 (** Called when a CLI user downloads a backup of the database *)
 let pull_database_backup_handler (req: Http.request) s =
   debug "received request to write out db as xml";
+  req.Http.close := true;
   Xapi_http.with_context "Dumping database as XML" req s
     (fun __context ->
       debug "sending headers";


_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] [PATCH] CA-24629: xapi does not close the connection after either /pool/xmldbdump or /export_metadata complete, Ewan Mellor <=