Permalink
Browse files

Rename userAgent -> userAgentString

Apparently Apple doesn't like it when asi-http synthesizes userAgent.

pokeb#309
  • Loading branch information...
1 parent 80e1dc8 commit 6ef10d390886cf5b6056e83f6fa76bf8ec544eb7 @erikchen committed Mar 6, 2012
Showing with 9 additions and 9 deletions.
  1. +2 −2 Classes/ASIHTTPRequest.h
  2. +7 −7 Classes/ASIHTTPRequest.m
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;

0 comments on commit 6ef10d3

Please sign in to comment.