@@ -52,11 +52,11 @@ #define MEBIBYTE (1024 * 1024) #define KIBIBYTE (1024) @interface OFHTTP: OFObject { - OFArray OF_GENERIC(OFString*) *_URLs; + OFArray OF_GENERIC(OFString *) *_URLs; size_t _URLIndex; int _errorCode; OFString *_outputPath; bool _continue, _force, _detectFileName, _quiet, _verbose, _insecure; OFDataArray *_body; @@ -135,11 +135,11 @@ } return self; } -- (void)addHeader: (OFString*)header +- (void)addHeader: (OFString *)header { size_t pos = [header rangeOfString: @":"].location; OFString *name, *value; if (pos == OF_NOT_FOUND) { @@ -158,11 +158,11 @@ [_clientHeaders setObject: value forKey: name]; } -- (void)setBody: (OFString*)file +- (void)setBody: (OFString *)file { [_body release]; if ([file isEqual: @"-"]) { void *pool = objc_autoreleasePoolPush(); @@ -172,11 +172,11 @@ objc_autoreleasePoolPop(pool); } else _body = [[OFDataArray alloc] initWithContentsOfFile: file]; } -- (void)setMethod: (OFString*)method +- (void)setMethod: (OFString *)method { void *pool = objc_autoreleasePoolPush(); method = [method uppercaseString]; @@ -201,11 +201,11 @@ } objc_autoreleasePoolPop(pool); } -- (void)setProxy: (OFString*)proxy +- (void)setProxy: (OFString *)proxy { @try { size_t pos = [proxy rangeOfString: @":" options: OF_STRING_SEARCH_BACKWARDS].location; @@ -369,31 +369,31 @@ [self performSelector: @selector(downloadNextURL) afterDelay: 0]; } -- (void)client: (OFHTTPClient*)client - didCreateSocket: (OF_KINDOF(OFTCPSocket*))socket - request: (OFHTTPRequest*)request +- (void)client: (OFHTTPClient *)client + didCreateSocket: (OF_KINDOF(OFTCPSocket *))socket + request: (OFHTTPRequest *)request { if (_insecure && [socket respondsToSelector: @selector(setCertificateVerificationEnabled:)]) [socket setCertificateVerificationEnabled: false]; } -- (bool)client: (OFHTTPClient*)client - shouldFollowRedirect: (OFURL*)URL +- (bool)client: (OFHTTPClient *)client + shouldFollowRedirect: (OFURL *)URL statusCode: (int)statusCode - request: (OFHTTPRequest*)request - response: (OFHTTPResponse*)response + request: (OFHTTPRequest *)request + response: (OFHTTPResponse *)response { if (!_quiet) [of_stdout writeFormat: @" ➜ %d\n", statusCode]; if (_verbose) { void *pool = objc_autoreleasePoolPush(); - OFDictionary OF_GENERIC(OFString*, OFString*) *headers = + OFDictionary OF_GENERIC(OFString *, OFString *) *headers = [response headers]; OFEnumerator *keyEnumerator = [headers keyEnumerator]; OFEnumerator *objectEnumerator = [headers objectEnumerator]; OFString *key, *object; @@ -410,11 +410,11 @@ [of_stdout writeFormat: @"☇ %@", [URL string]]; return true; } -- (OFHTTPResponse*)performRequest: (OFHTTPRequest*)request +- (OFHTTPResponse *)performRequest: (OFHTTPRequest *)request { OFHTTPResponse *response = nil; @try { response = [_HTTPClient performRequest: request]; @@ -500,11 +500,11 @@ [of_stdout writeFormat: @" ➜ %d\n", [response statusCode]]; return response; } -- (OFString*)fileNameFromContentDisposition: (OFString*)contentDisposition +- (OFString *)fileNameFromContentDisposition: (OFString *)contentDisposition { void *pool; const char *UTF8String; size_t UTF8StringLength; enum { @@ -620,14 +620,14 @@ [fileName retain]; objc_autoreleasePoolPop(pool); return [fileName autorelease]; } -- (bool)stream: (OFHTTPResponse*)response - didReadIntoBuffer: (void*)buffer +- (bool)stream: (OFHTTPResponse *)response + didReadIntoBuffer: (void *)buffer length: (size_t)length - exception: (OFException*)e + exception: (OFException *)e { if (e != nil) { OFString *URL; [_progressBar stop]; @@ -687,11 +687,11 @@ OFString *URLString = nil; OFURL *URL; OFMutableDictionary *clientHeaders; OFHTTPRequest *request; OFHTTPResponse *response; - OFDictionary OF_GENERIC(OFString*, OFString*) *headers; + OFDictionary OF_GENERIC(OFString *, OFString *) *headers; OFString *fileName = nil, *lengthString, *type; _length = -1; _received = _resumedFrom = 0; @@ -827,12 +827,12 @@ lengthString = OF_LOCALIZED(@"size_unknown", @"unknown"); if (_verbose) { void *pool = objc_autoreleasePoolPush(); - OFDictionary OF_GENERIC(OFString*, OFString*) *headers = - [response headers]; + OFDictionary OF_GENERIC(OFString *, OFString *) + *headers = [response headers]; OFEnumerator *keyEnumerator = [headers keyEnumerator]; OFEnumerator *objectEnumerator = [headers objectEnumerator]; OFString *key, *object;