From kde-core-devel Mon Mar 12 23:02:57 2001 From: Thiago Macieira Date: Mon, 12 Mar 2001 23:02:57 +0000 To: kde-core-devel Subject: IPv6 -- we're almost there X-MARC-Message: https://marc.info/?l=kde-core-devel&m=98445752416385 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------030007050900010506080407" This is a multi-part message in MIME format. --------------030007050900010506080407 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Having received no more bug reports on the current support for IPv6 in KDE, I'm tempted to bring it to the next level: commit it. The following systems have been reported to work: - Linux (glibc 2.1) - AIX - Tru64 4.x - Solaris 2.6 and 7 it should work in Tru64 5.x, Solaris 8 and any *BSD with KAME as well, since those systems are IPv6-ready. On non-IPv6-ready systems, the emulation routines in kdecore/netsupp.cpp (moved into libkdecore, from libkdefakes, since it's C++, but it doesn't have to be) should be enough to get the system working. I will wait for a response on whether I should commit as it is now, or if modifications should be made. I won't commit until I hear a "go ahead". Meanwhile, I've found a bug in KURL, when an URL with brackets is given (e.g., http://[::1]). It will parse the URL correctly, but KURL::prettyURL won't include the brackets. The following patch fixes it, but the solution is not "elegant". Should I commit it anyways? -- Thiago Macieira - UFOT Registry number: 1001 thiagom@mail.com talha@geocities.com ICQ UIN: 1967141 PGP: 0x8F2978D5 and 0xEA9037A5 Registered Linux user #65028 197/387. You stood by me...when most people would have run for the nearest airlock. You were willing to see past my shortcomings, and to take all the bumps and bruises that came along with it. You made me a better person. Even though I put up one hell of a fight. -- Lt. B'Elanna Torres, "Course: Oblivion" --------------030007050900010506080407 Content-Type: text/plain; name="kurl.cpp-brackets.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="kurl.cpp-brackets.diff" Index: kurl.cpp =================================================================== RCS file: /home/kde/kdelibs/kdecore/kurl.cpp,v retrieving revision 1.164 diff -u -3 -p -r1.164 kurl.cpp --- kurl.cpp 2001/03/06 01:17:48 1.164 +++ kurl.cpp 2001/03/12 23:00:40 @@ -1107,7 +1107,15 @@ QString KURL::prettyURL( int _trailing ) // Don't show password! u += "@"; } - u += lazy_encode(m_strHost); + // Check that host has ':', which means IPv6 (not hostname) + if (m_strHost.find(':') != -1) + { + u += '['; + u += lazy_encode(m_strHost); + u += ']'; + } + else + u += lazy_encode(m_strHost); if ( m_iPort != 0 ) { QString buffer; buffer.sprintf( ":%u", m_iPort ); --------------030007050900010506080407--