@@ -63,13 +63,13 @@ + request { return [[[self alloc] init] autorelease]; } -+ requestWithURL: (OFURL*)url ++ requestWithURL: (OFURL*)URL { - return [[[self alloc] initWithURL: url] autorelease]; + return [[[self alloc] initWithURL: URL] autorelease]; } - init { self = [super init]; @@ -82,16 +82,16 @@ storesData = YES; return self; } -- initWithURL: (OFURL*)url +- initWithURL: (OFURL*)URL_ { self = [self init]; @try { - [self setURL: url]; + [self setURL: URL_]; } @catch (id e) { [self release]; @throw e; } @@ -106,33 +106,33 @@ [(id)delegate release]; [super dealloc]; } -- (void)setURL: (OFURL*)url +- (void)setURL: (OFURL*)URL_ { - OF_SETTER(URL, url, YES, YES) + OF_SETTER(URL, URL_, YES, YES) } - (OFURL*)URL { OF_GETTER(URL, YES) } -- (void)setRequestType: (of_http_request_type_t)type +- (void)setRequestType: (of_http_request_type_t)requestType_ { - requestType = type; + requestType = requestType_; } - (of_http_request_type_t)requestType { return requestType; } -- (void)setQueryString: (OFString*)qs +- (void)setQueryString: (OFString*)queryString_ { - OF_SETTER(queryString, qs, YES, YES) + OF_SETTER(queryString, queryString_, YES, YES) } - (OFString*)queryString { OF_GETTER(queryString, YES) @@ -166,13 +166,13 @@ - (id )delegate { OF_GETTER(delegate, YES) } -- (void)setStoresData: (BOOL)enabled +- (void)setStoresData: (BOOL)storesData_ { - storesData = enabled; + storesData = storesData_; } - (BOOL)storesData { return storesData; @@ -211,12 +211,12 @@ OFMutableDictionary *serverHeaders; OFDataArray *data; OFEnumerator *enumerator; OFString *key; int status; - const char *t = NULL; - char *buf; + const char *type = NULL; + char *buffer; size_t bytesReceived; OFString *contentLengthHeader; [sock connectToHost: [URL host] onPort: [URL port]]; @@ -226,24 +226,24 @@ * using HTTPS. */ [sock setBuffersWrites: YES]; if (requestType == OF_HTTP_REQUEST_TYPE_GET) - t = "GET"; + type = "GET"; if (requestType == OF_HTTP_REQUEST_TYPE_HEAD) - t = "HEAD"; + type = "HEAD"; if (requestType == OF_HTTP_REQUEST_TYPE_POST) - t = "POST"; + type = "POST"; if ([(path = [URL path]) isEqual: @""]) path = @"/"; if ([URL query] != nil) [sock writeFormat: @"%s %@?%@ HTTP/1.0\r\n", - t, path, [URL query]]; + type, path, [URL query]]; else - [sock writeFormat: @"%s %@ HTTP/1.0\r\n", t, path]; + [sock writeFormat: @"%s %@ HTTP/1.0\r\n", type, path]; if ([URL port] == 80) [sock writeFormat: @"Host: %@\r\n", [URL host]]; else [sock writeFormat: @"Host: %@:%d\r\n", [URL host], @@ -365,27 +365,27 @@ if (storesData) data = [OFDataArray dataArrayWithItemSize: 1]; else data = nil; - buf = [self allocMemoryWithSize: of_pagesize]; + buffer = [self allocMemoryWithSize: of_pagesize]; bytesReceived = 0; @try { size_t len; while ((len = [sock readNBytes: of_pagesize - intoBuffer: buf]) > 0) { + intoBuffer: buffer]) > 0) { [delegate request: self - didReceiveData: buf + didReceiveData: buffer withLength: len]; bytesReceived += len; [data addNItems: len - fromCArray: buf]; + fromCArray: buffer]; } } @finally { - [self freeMemory: buf]; + [self freeMemory: buffer]; } if ((contentLengthHeader = [serverHeaders objectForKey: @"Content-Length"]) != nil) { intmax_t cl = [contentLengthHeader decimalValue];