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
signature.asc
Description: OpenPGP digital signature