84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
- (void)setURLEncodedHost: (OFString *)URLEncodedHost
{
OFString *old;
if ([URLEncodedHost hasPrefix: @"["] &&
[URLEncodedHost hasSuffix: @"]"]) {
if (!OFURLIsIPv6Host([URLEncodedHost substringWithRange:
OFRangeMake(1, URLEncodedHost.length - 2)]))
@throw [OFInvalidFormatException exception];
} else if (URLEncodedHost != nil)
OFURLVerifyIsEscaped(URLEncodedHost,
[OFCharacterSet URLHostAllowedCharacterSet]);
old = _URLEncodedHost;
_URLEncodedHost = [URLEncodedHost copy];
|
|
|
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
- (void)setURLEncodedHost: (OFString *)URLEncodedHost
{
OFString *old;
if ([URLEncodedHost hasPrefix: @"["] &&
[URLEncodedHost hasSuffix: @"]"]) {
if (!OFURLIsIPv6Host([URLEncodedHost substringWithRange:
OFMakeRange(1, URLEncodedHost.length - 2)]))
@throw [OFInvalidFormatException exception];
} else if (URLEncodedHost != nil)
OFURLVerifyIsEscaped(URLEncodedHost,
[OFCharacterSet URLHostAllowedCharacterSet]);
old = _URLEncodedHost;
_URLEncodedHost = [URLEncodedHost copy];
|
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
|
done = false;
break;
}
if ([current isEqual: @".."] && parent != nil &&
![parent isEqual: @".."]) {
[array removeObjectsInRange:
OFRangeMake(i - 1, 2)];
done = false;
break;
}
}
}
|
|
|
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
|
done = false;
break;
}
if ([current isEqual: @".."] && parent != nil &&
![parent isEqual: @".."]) {
[array removeObjectsInRange:
OFMakeRange(i - 1, 2)];
done = false;
break;
}
}
}
|