[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    IPv6 -- we're almost there
From:       Thiago Macieira <thiagom () mail ! com>
Date:       2001-03-12 23:02:57
[Download RAW message or body]

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"

["kurl.cpp-brackets.diff" (text/plain)]

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 );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic