@@ -189,20 +189,20 @@ OFString *scheme = [URL scheme]; OFTCPSocket *sock; OFHTTPRequestResult *result; if (![scheme isEqual: @"http"] && ![scheme isEqual: @"https"]) - @throw [OFUnsupportedProtocolException newWithClass: isa - URL: URL]; + @throw [OFUnsupportedProtocolException exceptionWithClass: isa + URL: URL]; if ([scheme isEqual: @"http"]) sock = [OFTCPSocket socket]; else { if (of_http_request_tls_socket_class == Nil) @throw [OFUnsupportedProtocolException - newWithClass: isa - URL: URL]; + exceptionWithClass: isa + URL: URL]; sock = [[[of_http_request_tls_socket_class alloc] init] autorelease]; } @@ -281,11 +281,11 @@ */ line = [sock readLine]; if (![line hasPrefix: @"HTTP/1.0 "] && ![line hasPrefix: @"HTTP/1.1 "]) @throw [OFInvalidServerReplyException - newWithClass: isa]; + exceptionWithClass: isa]; status = (int)[[line substringWithRange: of_range(9, 3)] decimalValue]; serverHeaders = [OFMutableDictionary dictionary]; @@ -297,11 +297,11 @@ if ([line isEqual: @""]) break; if ((tmp = strchr(line_c, ':')) == NULL) @throw [OFInvalidServerReplyException - newWithClass: isa]; + exceptionWithClass: isa]; key = [OFString stringWithUTF8String: line_c length: tmp - line_c]; normalize_key(key); @@ -384,21 +384,21 @@ [serverHeaders objectForKey: @"Content-Length"]) != nil) { intmax_t cl = [contentLengthHeader decimalValue]; if (cl > SIZE_MAX) @throw [OFOutOfRangeException - newWithClass: isa]; + exceptionWithClass: isa]; /* * We only want to throw on these status codes as we * will throw an OFHTTPRequestFailedException for all * other status codes later. */ if (cl != bytesReceived && (status == 200 || status == 301 || status == 302 || status == 303)) @throw [OFTruncatedDataException - newWithClass: isa]; + exceptionWithClass: isa]; } [serverHeaders makeImmutable]; result = [[OFHTTPRequestResult alloc] @@ -407,13 +407,13 @@ data: data]; if (status != 200 && status != 301 && status != 302 && status != 303) @throw [OFHTTPRequestFailedException - newWithClass: isa - HTTPRequest: self - result: result]; + exceptionWithClass: isa + HTTPRequest: self + result: result]; } @finally { [pool release]; } return [result autorelease];