[Libguestfs] URI Handling Patch

Gabriel Hartmann gabriel.hartmann at gmail.com
Thu Jun 25 18:44:50 UTC 2015


I have written a patch (please see attached) which fixes both of these bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1092583
https://bugzilla.redhat.com/show_bug.cgi?id=1232477

By default, when saving a URI using xmlSaveUri it escapes everything in the
URI.  QEMU doesn't want anything escaped, so now I unescape everything
after the URI is generated.  Unfortunately there's no flag to change the
default behavior.

The other problem was that only the "path" portion of the URI struct was
being used to indicate the path.  That's natural enough, but that practice
is what was dropping the query string.  The query string is kept separately
from the path.  I now concat the query string back onto the URI with a
separating '?'.

I've successfully mounted remote vhds in Azure with this new code, and the
basic set of tests pass.  If there's anything else I can do by way of
verification, please let me know.

-- Gabriel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20150625/29504095/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-URI-handling-was-broken-for-anything-containing-a-qu.patch
Type: application/octet-stream
Size: 2271 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20150625/29504095/attachment.obj>


More information about the Libguestfs mailing list