From: Eric Blake <eblake@redhat.com>
To: Matthew Booth <mbooth@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH 1/4] curl: Fix parsing of readahead option from filename
Date: Wed, 14 May 2014 10:55:58 -0600 [thread overview]
Message-ID: <5373A01E.8060500@redhat.com> (raw)
In-Reply-To: <53739325.1030306@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2029 bytes --]
On 05/14/2014 10:00 AM, Matthew Booth wrote:
> On 13/05/14 13:29, Eric Blake wrote:
>> On 05/08/2014 02:42 AM, Matthew Booth wrote:
>>> curl_parse_filename wasn't removing the option string from the
>>> url, resulting in a 404.
>>>
>>> This change is a rewrite of the previous parsing behaviour, and
>>> also changes the option syntax. The new syntax is:
>>>
>>> http://example.com/path?query[sslverify=off:readahead=64k]
>
>> Again, I'm not sure I'm happy with this - we shouldn't be inventing
>> our own syntax when URI is already a well-defined syntax.
>
> I don't understand. Are you suggesting adding the options as query
> parameters to the URI? We obviously can't do that, because it would
> change the URI. Neither can we assume that the URI will not contain
> query parameters and we have them to ourselves. For example, vsphere
> disk URIs, which is what I'm targetting, contain query parameters.
I think the better suggestion has already been made elsewhere in the
thread: _don't_ allow sslverify or readahead as parameters in the
filename, but require them to be separate parameters. And don't add any
new locally interpreted parameters in the filename. The filename should
be passed, intact, to the curl command, and any additional parameters
that affect how we use curl should be separate options rather than
trying to encode them into the curl filename. We have the new json:
string parsing to make it possible to encode a single string that
includes both the curl filename URL and any separate options for
contexts where an option must be supplied but encoded into a single string.
So, a proper command line would include something like:
-drive
"file.driver=curl,file.filename=http://example.com/path?query...,file.sslverify=off,file.readahead=64k"
and the URL passed to curl is passed verbatim, without trying to pack in
any extra stuff needed locally.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-05-14 16:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-08 8:42 [Qemu-devel] Curl updates Matthew Booth
2014-05-08 8:42 ` [Qemu-devel] [PATCH 1/4] curl: Fix parsing of readahead option from filename Matthew Booth
2014-05-13 17:29 ` Eric Blake
2014-05-14 16:00 ` Matthew Booth
2014-05-14 16:55 ` Eric Blake [this message]
2014-05-08 8:42 ` [Qemu-devel] [PATCH 2/4] curl: Add sslverify option Matthew Booth
2014-05-08 8:42 ` [Qemu-devel] [PATCH 3/4] curl: Add usage documentation Matthew Booth
2014-05-08 8:42 ` [Qemu-devel] [PATCH 4/4] curl: Fix build when curl_multi_socket_action isn't available Matthew Booth
2014-05-13 19:47 ` [Qemu-devel] Curl updates Eric Blake
2014-05-14 7:48 ` Kevin Wolf
2014-05-14 12:59 ` Eric Blake
2014-05-14 16:08 ` Matthew Booth
2014-05-14 16:43 ` Kevin Wolf
2014-05-14 21:20 ` Matthew Booth
2014-05-14 21:36 ` Eric Blake
2014-05-14 16:59 ` Eric Blake
2014-05-14 16:06 ` Matthew Booth
2014-05-14 17:02 ` Eric Blake
2014-05-14 20:45 ` Matthew Booth
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=5373A01E.8060500@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mbooth@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).