[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH] CA-24629: xapi does not close the connection after either /pool/xmldbdump or /export_metadata complete



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.