genericservices/httputils/UriParser/TUriParser.cpp
branchRCL_3
changeset 27 3a7375419266
parent 0 e4d67989cc36
--- a/genericservices/httputils/UriParser/TUriParser.cpp	Tue May 11 17:47:24 2010 +0300
+++ b/genericservices/httputils/UriParser/TUriParser.cpp	Tue May 25 14:32:39 2010 +0300
@@ -324,6 +324,11 @@
 			}
 		else
 			{
+		
+	    // First, move past the opening brace
+	        authority.Set(authority.Mid(startHostIPv6 + 1));
+	            // auth now = X:X:X]?????
+	            
 			// This is an IPv6 address, so it MUST have the closing brace too....
 			TInt endIPv6Host = authority.Locate(KIPv6UriCloseBrace);
 
@@ -334,16 +339,13 @@
 			// It's an ipv6  address, with an opening and closing brace. So now just extract it
 			// auth = [X:X:X]?????
 
-			// First, move past the opening brace
-			authority.Set(authority.Mid(startHostIPv6 + 1));
-			// auth now = X:X:X]?????
 
 			// Set the host, and need to remove the closing brace
-			aHost.Set(authority.Left(endIPv6Host -1));
+			aHost.Set(authority.Left(endIPv6Host));
 			// host = X:X:X
 
 			// Move past the host
-			authority.Set(authority.Mid(endIPv6Host));
+			authority.Set(authority.Mid(endIPv6Host + 1 ));
 			}
 		
 		// Get the port...