[libvirt] [PATCH] util: Prepare URI formatting for libxml2 >= 2.9.2

Eric Blake eblake at redhat.com
Fri Oct 3 18:48:00 UTC 2014


On 10/03/2014 10:47 AM, Martin Kletzander wrote:
> Since commit 8eb55d782a2b9afacc7938694891cc6fad7b42a5 libxml2 removes
> two slashes from the URI when there is no server part.  This is fixed
> with beb7281055dbf0ed4d041022a67c6c5cfd126f25, but only if the calling
> application calls xmlSaveUri() on URI that xmlURIParse() parsed.  And
> that is not the case in virURIFormat().  virURIFormat() accepts
> virURIPtr that can be created without parsing it and we do that when we
> format network storage paths for gluster for example.  Even though
> virStorageSourceParseBackingURI() uses virURIParse(), it throws that data
> structure right away.
> 
> Since we want to format URIs as URIs and not absolute URIs or opaque
> URIs (see RFC 3986), we can specify that with a special hack thanks to
> commit beb7281055dbf0ed4d041022a67c6c5cfd126f25, by setting port to -1.
> 
> This fixes qemuxml2argvtest test where the disk-drive-network-gluster
> case was failing.
> 
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
>  src/util/viruri.c | 7 +++++++
>  1 file changed, 7 insertions(+)

ACK.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20141003/1e796c0d/attachment-0001.sig>


More information about the libvir-list mailing list