[Libguestfs] URI Handling Patch

Gabriel Hartmann gabriel.hartmann at gmail.com
Mon Jun 29 18:09:52 UTC 2015


Re-adding Snesha: +sneshaf at microsoft.com <sneshaf at microsoft.com>

Hi Pino,

Thanks, this looks like a good list of alternatives.  I think (b) is
probably the way to go.  I'm willing to just add the query string to the
path in only the HTTP and HTTPS cases for now.  If other protocols run into
some problems around lacking query strings we can probably re-visit the
issue.  The (a) option seems needlessly complex and bug prone to me.

-- Gabriel


> We have few possibilities at this point, in order of complexity:
>
> (a) split the query string into an "hash table" (i.e. a C list of
> key/value items), pass that as new parameter to add_drive, and rebuild
> a query string depending on the backend (direct/qemu, libvirt, etc) and
> on the protocol (http, nbd, etc)
>
> (b) pass the query string as-is (percent-encoded or not) to add_drive,
> and add it back depending on the protocol
>
> (c) join the query string to the path, depending on the protocol, in
> guestfish
>
> Your solution so far is (c), while IMHO a better one would be (b) or
> even (a).
>
> Also, something more to check is how e.g. libvirt needs such kind of
> URI parameter after the path, and how. You can check whether your
> change also work with libvirt by exporting LIBGUESTFS_BACKEND=libvirt
> (or also using "set-backend libvirt" in guestfish), provided you have
> built libguestfs with libvirt support.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20150629/391280d4/attachment.htm>


More information about the Libguestfs mailing list