From 361b9fca67e5aae4eeae18594f61b6dec243e115 Mon Sep 17 00:00:00 2001 From: rfm Date: Sun, 14 Dec 2008 18:04:01 +0000 Subject: [PATCH] Tweak test for ipv6 host git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27289 72102866-910b-0410-8b05-ffd578937521 --- Source/NSURL.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/NSURL.m b/Source/NSURL.m index 9e116d6f7..152c67055 100644 --- a/Source/NSURL.m +++ b/Source/NSURL.m @@ -544,7 +544,7 @@ static unsigned urlAlign; { /* Add square brackets around ipv6 address if necessary */ - if ([aHost rangeOfString: @":"].length > 0 + if ([[aHost componentsSeparatedByString: @":"] count] > 2 && [aHost hasPrefix: @"["] == NO) { aHost = [NSString stringWithFormat: @"[%@]", aHost];