875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
|
}
- (OFString *)host
{
if ([_URLEncodedHost hasPrefix: @"["] &&
[_URLEncodedHost hasSuffix: @"]"]) {
OFString *host = [_URLEncodedHost substringWithRange:
OFMakeRange(1, _URLEncodedHost.length - 2)];
if (!of_url_is_ipv6_host(host))
@throw [OFInvalidArgumentException exception];
return host;
}
|
|
|
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
|
}
- (OFString *)host
{
if ([_URLEncodedHost hasPrefix: @"["] &&
[_URLEncodedHost hasSuffix: @"]"]) {
OFString *host = [_URLEncodedHost substringWithRange:
OFRangeMake(1, _URLEncodedHost.length - 2)];
if (!of_url_is_ipv6_host(host))
@throw [OFInvalidArgumentException exception];
return host;
}
|