
On Wed, Feb 15, 2012 at 03:05:34PM +0100, Martin Kletzander wrote:
On 02/13/2012 10:57 AM, Martin Kletzander wrote:
But as I say, I think this is the worst option considering the real problem is with "brackets around IPv6 in libxml2" and fixing it there would save us from dealing with lots of bugs.
Let's suppose bug #624626 [1] will be fixed soon. Is there a need to support older libxml2 as well (those versions without the fix) in this case?
Martin
Hum .... I completely missed this, I'm not sure I understand comment 2: paphio:~/XML -> testURI --debug 'qemu+ssh://[3ffe::102]/system' scheme: qemu+ssh server: [3ffe::102] path: /system qemu+ssh://[3ffe::102]/system paphio:~/XML -> Seems to me that libxml2 URI parsing works as expected if I look at http://www.ietf.org/rfc/rfc3986.txt which is the level of the URI spec that libxml2 implements: authority = [ userinfo "@" ] host [ ":" port ] host = IP-literal / IPv4address / reg-name IP-literal = "[" ( IPv6address / IPvFuture ) "]" IPv6address = 6( h16 ":" ) ls32 / "::" 5( h16 ":" ) ls32 / [ h16 ] "::" 4( h16 ":" ) ls32 / [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32 / [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32 / [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32 / [ *4( h16 ":" ) h16 ] "::" ls32 / [ *5( h16 ":" ) h16 ] "::" h16 / [ *6( h16 ":" ) h16 ] "::" ls32 = ( h16 ":" h16 ) / IPv4address ; least-significant 32 bits of address h16 = 1*4HEXDIG ; 16 bits of address represented in hexadecimal so it seems to me that the "[" and "]" are part of the host address per the RFC spec and well libxml2 parsing is adequate. I'm not sure I understand the parsing problem, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/