@@ -28,10 +28,11 @@ #import "OFDictionary.h" #import "OFFile.h" #import "OFURL.h" #import "OFHTTPClient.h" #import "OFHTTPRequest.h" +#import "OFHTTPRequestReply.h" #import "OFDataArray.h" #import "OFXMLElement.h" #import "OFHTTPRequestFailedException.h" #import "OFInitializationFailedException.h" @@ -805,11 +806,11 @@ encoding: (of_string_encoding_t)encoding { void *pool; OFHTTPClient *client; OFHTTPRequest *request; - OFHTTPRequestResult *result; + OFHTTPRequestReply *reply; OFString *contentType; Class c; c = [self class]; [self release]; @@ -826,20 +827,20 @@ return self; } client = [OFHTTPClient client]; request = [OFHTTPRequest requestWithURL: URL]; - result = [client performRequest: request]; + reply = [client performRequest: request]; - if ([result statusCode] != 200) + if ([reply statusCode] != 200) @throw [OFHTTPRequestFailedException exceptionWithClass: [request class] request: request - result: result]; + reply: reply]; if (encoding == OF_STRING_ENCODING_AUTODETECT && - (contentType = [[result headers] objectForKey: @"Content-Type"])) { + (contentType = [[reply headers] objectForKey: @"Content-Type"])) { contentType = [contentType lowercaseString]; if ([contentType hasSuffix: @"charset=utf-8"]) encoding = OF_STRING_ENCODING_UTF_8; if ([contentType hasSuffix: @"charset=iso-8859-1"]) @@ -851,13 +852,13 @@ } if (encoding == OF_STRING_ENCODING_AUTODETECT) encoding = OF_STRING_ENCODING_UTF_8; - self = [[c alloc] initWithCString: (char*)[[result data] items] + self = [[c alloc] initWithCString: (char*)[[reply data] items] encoding: encoding - length: [[result data] count]]; + length: [[reply data] count]]; objc_autoreleasePoolPop(pool); return self; }