From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNO6i-0008JA-BM for qemu-devel@nongnu.org; Fri, 29 Aug 2014 11:29:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNO6d-0006zz-Ca for qemu-devel@nongnu.org; Fri, 29 Aug 2014 11:28:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNO6d-0006zt-3N for qemu-devel@nongnu.org; Fri, 29 Aug 2014 11:28:51 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7TFSoFx007750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 29 Aug 2014 11:28:50 -0400 Date: Fri, 29 Aug 2014 16:28:48 +0100 From: "Richard W.M. Jones" Message-ID: <20140829152848.GC1302@redhat.com> References: <1409324592-31888-1-git-send-email-rjones@redhat.com> <1409324592-31888-2-git-send-email-rjones@redhat.com> <540097D2.2020200@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <540097D2.2020200@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] curl: Allow a cookie or cookies to be sent with http/https requests. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mbooth@redhat.com On Fri, Aug 29, 2014 at 09:10:10AM -0600, Eric Blake wrote: > On 08/29/2014 09:03 AM, Richard W.M. Jones wrote: > > In order to access VMware ESX efficiently, we need to send a session > > cookie. This patch is very simple and just allows you to send that > > session cookie. It punts on the question of how you get the session > > cookie in the first place, but in practice you can just run a `curl' > > command against the server and extract the cookie that way. > > > > > +++ b/qemu-options.hx > > @@ -2351,6 +2351,11 @@ multiple of 512 bytes. It defaults to 256k. > > @item sslverify > > Whether to verify the remote server's certificate when connecting over SSL. It > > can have the value 'on' or 'off'. It defaults to 'on'. > > + > > +@item cookie > > +Send this cookie (it can also be a list of cookies separated by ';') with > > +each outgoing request. Only supported when using protocols such as HTTP > > +which support cookies, otherwise ignored. > > ';' has to be quoted to enter it in the shell command line (but then > again, the cookie probably contains literal " which also has to be quoted). > > We still don't have a QMP mapping for curl device hotplug. But when we > gain one, do we really want to have a single (long) string containing > multiple cookies, or would it be better to make this an array argument? > On the command-line, which is nicer, taking the cookie option multiple > times ('file.cookie=xyz,file.cookie.abc'), taking it as an automatic > array ('file.cookie.0=xyz,file.cookie.1=abc') or forcing the user to > cram all cookies into a single option ('file.cookie="xyz;abc"')? For my immediate needs, I don't care at all about multiple cookies. It's just a side-effect of the CURL API that they would work here. I'm happy to drop all references to them from the documentation ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v