@@ -329,11 +329,11 @@ OFString *scheme = [URL scheme]; of_http_request_method_t method = [request method]; OFMutableString *requestString; OFString *user, *password; OFDictionary *headers = [request headers]; - OFDataArray *entity = [request entity]; + OFDataArray *body = [request body]; OFTCPSocket *socket; OFHTTPClientResponse *response; OFString *line, *version, *redirect, *connectionHeader; bool keepAlive; OFMutableDictionary *serverHeaders; @@ -422,15 +422,15 @@ if ([headers objectForKey: @"User-Agent"] == nil) [requestString appendString: @"User-Agent: Something using ObjFW " @"\r\n"]; - if (entity != nil) { + if (body != nil) { if ([headers objectForKey: @"Content-Length"] == nil) [requestString appendFormat: @"Content-Length: %zd\r\n", - [entity itemSize] * [entity count]]; + [body itemSize] * [body count]]; if ([headers objectForKey: @"Content-Type"] == nil) [requestString appendString: @"Content-Type: application/x-www-form-urlencoded; " @"charset=UTF-8\r\n"]; @@ -458,13 +458,13 @@ /* Reconnect in case a keep-alive connection timed out */ socket = [self OF_closeAndCreateSocketForRequest: request]; [socket writeString: requestString]; } - if (entity != nil) - [socket writeBuffer: [entity items] - length: [entity count] * [entity itemSize]]; + if (body != nil) + [socket writeBuffer: [body items] + length: [body count] * [body itemSize]]; @try { line = [socket readLine]; } @catch (OFInvalidEncodingException *e) { @throw [OFInvalidServerReplyException exception]; @@ -477,14 +477,14 @@ */ if (line == nil) { socket = [self OF_closeAndCreateSocketForRequest: request]; [socket writeString: requestString]; - if (entity != nil) - [socket writeBuffer: [entity items] - length: [entity count] * - [entity itemSize]]; + if (body != nil) + [socket writeBuffer: [body items] + length: [body count] * + [body itemSize]]; @try { line = [socket readLine]; } @catch (OFInvalidEncodingException *e) { @throw [OFInvalidServerReplyException exception]; @@ -632,11 +632,11 @@ OFHTTPRequest *newRequest; newRequest = [OFHTTPRequest requestWithURL: newURL]; [newRequest setMethod: method]; [newRequest setHeaders: headers]; - [newRequest setEntity: entity]; + [newRequest setBody: body]; /* * 303 means the request should be converted to a GET * request before redirection. This also means stripping * the entity of the request. @@ -658,11 +658,11 @@ forKey: key]; [newRequest setMethod: OF_HTTP_REQUEST_METHOD_GET]; [newRequest setHeaders: newHeaders]; - [newRequest setEntity: nil]; + [newRequest setBody: nil]; } [newRequest retain]; objc_autoreleasePoolPop(pool); [newRequest autorelease];