322 // Move past the host |
322 // Move past the host |
323 authority.Set(authority.Mid(hostEndPos)); |
323 authority.Set(authority.Mid(hostEndPos)); |
324 } |
324 } |
325 else |
325 else |
326 { |
326 { |
|
327 |
|
328 // First, move past the opening brace |
|
329 authority.Set(authority.Mid(startHostIPv6 + 1)); |
|
330 // auth now = X:X:X]????? |
|
331 |
327 // This is an IPv6 address, so it MUST have the closing brace too.... |
332 // This is an IPv6 address, so it MUST have the closing brace too.... |
328 TInt endIPv6Host = authority.Locate(KIPv6UriCloseBrace); |
333 TInt endIPv6Host = authority.Locate(KIPv6UriCloseBrace); |
329 |
334 |
330 // Return an error if the closing IPv6 delimiter isn't there. |
335 // Return an error if the closing IPv6 delimiter isn't there. |
331 if (endIPv6Host==KErrNotFound) |
336 if (endIPv6Host==KErrNotFound) |
332 return KUriUtilsErrInvalidUri; |
337 return KUriUtilsErrInvalidUri; |
333 |
338 |
334 // It's an ipv6 address, with an opening and closing brace. So now just extract it |
339 // It's an ipv6 address, with an opening and closing brace. So now just extract it |
335 // auth = [X:X:X]????? |
340 // auth = [X:X:X]????? |
336 |
341 |
337 // First, move past the opening brace |
|
338 authority.Set(authority.Mid(startHostIPv6 + 1)); |
|
339 // auth now = X:X:X]????? |
|
340 |
342 |
341 // Set the host, and need to remove the closing brace |
343 // Set the host, and need to remove the closing brace |
342 aHost.Set(authority.Left(endIPv6Host -1)); |
344 aHost.Set(authority.Left(endIPv6Host)); |
343 // host = X:X:X |
345 // host = X:X:X |
344 |
346 |
345 // Move past the host |
347 // Move past the host |
346 authority.Set(authority.Mid(endIPv6Host)); |
348 authority.Set(authority.Mid(endIPv6Host + 1 )); |
347 } |
349 } |
348 |
350 |
349 // Get the port... |
351 // Get the port... |
350 TInt portEndPos = authority.Length(); |
352 TInt portEndPos = authority.Length(); |
351 if( portEndPos ) |
353 if( portEndPos ) |