@@ -716,12 +716,11 @@ URLPort = URL.port; if (URLPort != nil) port = URLPort.unsignedShortValue; sock.delegate = self; - [sock asyncConnectToHost: URL.host - port: port]; + [sock asyncConnectToHost: URL.host port: port]; } @catch (id e) { [self raiseException: e]; } } @end @@ -798,12 +797,11 @@ if (_chunked) [_socket writeFormat: @"%zX\r\n", length]; else if (length > _toWrite) length = (size_t)_toWrite; - ret = [_socket writeBuffer: buffer - length: length]; + ret = [_socket writeBuffer: buffer length: length]; if (_chunked) [_socket writeString: @"\r\n"]; if (ret > length) @throw [OFOutOfRangeException exception]; @@ -903,22 +901,20 @@ @throw [OFInvalidServerReplyException exception]; } } } -- (size_t)lowlevelReadIntoBuffer: (void *)buffer - length: (size_t)length +- (size_t)lowlevelReadIntoBuffer: (void *)buffer length: (size_t)length { if (_socket == nil) @throw [OFNotOpenException exceptionWithObject: self]; if (_atEndOfStream) return 0; if (!_hasContentLength && !_chunked) - return [_socket readIntoBuffer: buffer - length: length]; + return [_socket readIntoBuffer: buffer length: length]; if (_socket.atEndOfStream) @throw [OFTruncatedDataException exception]; /* Content-Length */ @@ -926,13 +922,11 @@ size_t ret; if (length > (unsigned long long)_toRead) length = (size_t)_toRead; - ret = [_socket readIntoBuffer: buffer - length: length]; - + ret = [_socket readIntoBuffer: buffer length: length]; if (ret > length) @throw [OFOutOfRangeException exception]; _toRead -= ret; @@ -944,12 +938,11 @@ /* Chunked */ if (_toRead == -2) { char tmp[2]; - switch ([_socket readIntoBuffer: tmp - length: 2]) { + switch ([_socket readIntoBuffer: tmp length: 2]) { case 2: _toRead++; if (tmp[1] != '\n') @throw [OFInvalidServerReplyException exception]; @@ -965,12 +958,11 @@ return 0; } else if (_toRead == -1) { char tmp; - if ([_socket readIntoBuffer: &tmp - length: 1] == 1) { + if ([_socket readIntoBuffer: &tmp length: 1] == 1) { _toRead++; if (tmp != '\n') @throw [OFInvalidServerReplyException exception]; } @@ -981,15 +973,13 @@ return 0; } else if (_toRead > 0) { if (length > (unsigned long long)_toRead) length = (size_t)_toRead; - length = [_socket readIntoBuffer: buffer - length: length]; + length = [_socket readIntoBuffer: buffer length: length]; _toRead -= length; - if (_toRead == 0) _toRead = -2; return length; } else { @@ -1113,15 +1103,12 @@ } - (OFHTTPResponse *)performRequest: (OFHTTPRequest *)request redirects: (unsigned int)redirects { - [_client asyncPerformRequest: request - redirects: redirects]; - + [_client asyncPerformRequest: request redirects: redirects]; [[OFRunLoop currentRunLoop] run]; - return _response; } - (void)client: (OFHTTPClient *)client didPerformRequest: (OFHTTPRequest *)request @@ -1219,12 +1206,11 @@ [super dealloc]; } - (OFHTTPResponse *)performRequest: (OFHTTPRequest *)request { - return [self performRequest: request - redirects: REDIRECTS_DEFAULT]; + return [self performRequest: request redirects: REDIRECTS_DEFAULT]; } - (OFHTTPResponse *)performRequest: (OFHTTPRequest *)request redirects: (unsigned int)redirects { @@ -1242,12 +1228,11 @@ return [response autorelease]; } - (void)asyncPerformRequest: (OFHTTPRequest *)request { - [self asyncPerformRequest: request - redirects: REDIRECTS_DEFAULT]; + [self asyncPerformRequest: request redirects: REDIRECTS_DEFAULT]; } - (void)asyncPerformRequest: (OFHTTPRequest *)request redirects: (unsigned int)redirects {