Rename userAgent -> userAgentString #310

Merged
merged 1 commit into from Mar 6, 2012
View
4 Classes/ASIHTTPRequest.h
@@ -193,7 +193,7 @@ typedef void (^ASIDataBlock)(NSData *data);
NSString *password;
// User-Agent for this request
- NSString *userAgent;
+ NSString *userAgentString;
// Domain used for NTLM authentication
NSString *domain;
@@ -903,7 +903,7 @@ typedef void (^ASIDataBlock)(NSData *data);
@property (retain) NSString *username;
@property (retain) NSString *password;
-@property (retain) NSString *userAgent;
+@property (retain) NSString *userAgentString;
@property (retain) NSString *domain;
@property (retain) NSString *proxyUsername;
View
14 Classes/ASIHTTPRequest.m
@@ -392,7 +392,7 @@ - (void)dealloc
[connectionInfo release];
[requestID release];
[dataDecompressor release];
- [userAgent release];
+ [userAgentString release];
#if NS_BLOCKS_AVAILABLE
[self releaseBlocksOnMainThread];
@@ -1081,12 +1081,12 @@ - (void)buildRequestHeaders
// Build and set the user agent string if the request does not already have a custom user agent specified
if (![[self requestHeaders] objectForKey:@"User-Agent"]) {
- NSString *userAgentString = [self userAgent];
- if (!userAgentString) {
- userAgentString = [ASIHTTPRequest defaultUserAgentString];
+ NSString *tempUserAgentString = [self userAgentString];
+ if (!tempUserAgentString) {
+ tempUserAgentString = [ASIHTTPRequest defaultUserAgentString];
}
- if (userAgentString) {
- [self addRequestHeader:@"User-Agent" value:userAgentString];
+ if (tempUserAgentString) {
+ [self addRequestHeader:@"User-Agent" value:tempUserAgentString];
}
}
@@ -4991,7 +4991,7 @@ - (void)setRequestRedirectedBlock:(ASIBasicBlock)aRedirectBlock
@synthesize username;
@synthesize password;
-@synthesize userAgent;
+@synthesize userAgentString;
@synthesize domain;
@synthesize proxyUsername;
@synthesize proxyPassword;