Rename userAgent -> userAgentString
Apparently Apple doesn't like it when asi-http synthesizes userAgent. https://github.com/pokeb/asi-http-request/issues/309
Showing
2 changed files
with
9 additions
and
9 deletions
| @@ -193,7 +193,7 @@ typedef void (^ASIDataBlock)(NSData *data); | @@ -193,7 +193,7 @@ typedef void (^ASIDataBlock)(NSData *data); | ||
| 193 | NSString *password; | 193 | NSString *password; |
| 194 | 194 | ||
| 195 | // User-Agent for this request | 195 | // User-Agent for this request |
| 196 | - NSString *userAgent; | 196 | + NSString *userAgentString; |
| 197 | 197 | ||
| 198 | // Domain used for NTLM authentication | 198 | // Domain used for NTLM authentication |
| 199 | NSString *domain; | 199 | NSString *domain; |
| @@ -903,7 +903,7 @@ typedef void (^ASIDataBlock)(NSData *data); | @@ -903,7 +903,7 @@ typedef void (^ASIDataBlock)(NSData *data); | ||
| 903 | 903 | ||
| 904 | @property (retain) NSString *username; | 904 | @property (retain) NSString *username; |
| 905 | @property (retain) NSString *password; | 905 | @property (retain) NSString *password; |
| 906 | -@property (retain) NSString *userAgent; | 906 | +@property (retain) NSString *userAgentString; |
| 907 | @property (retain) NSString *domain; | 907 | @property (retain) NSString *domain; |
| 908 | 908 | ||
| 909 | @property (retain) NSString *proxyUsername; | 909 | @property (retain) NSString *proxyUsername; |
| @@ -392,7 +392,7 @@ static NSOperationQueue *sharedQueue = nil; | @@ -392,7 +392,7 @@ static NSOperationQueue *sharedQueue = nil; | ||
| 392 | [connectionInfo release]; | 392 | [connectionInfo release]; |
| 393 | [requestID release]; | 393 | [requestID release]; |
| 394 | [dataDecompressor release]; | 394 | [dataDecompressor release]; |
| 395 | - [userAgent release]; | 395 | + [userAgentString release]; |
| 396 | 396 | ||
| 397 | #if NS_BLOCKS_AVAILABLE | 397 | #if NS_BLOCKS_AVAILABLE |
| 398 | [self releaseBlocksOnMainThread]; | 398 | [self releaseBlocksOnMainThread]; |
| @@ -1081,12 +1081,12 @@ static NSOperationQueue *sharedQueue = nil; | @@ -1081,12 +1081,12 @@ static NSOperationQueue *sharedQueue = nil; | ||
| 1081 | 1081 | ||
| 1082 | // Build and set the user agent string if the request does not already have a custom user agent specified | 1082 | // Build and set the user agent string if the request does not already have a custom user agent specified |
| 1083 | if (![[self requestHeaders] objectForKey:@"User-Agent"]) { | 1083 | if (![[self requestHeaders] objectForKey:@"User-Agent"]) { |
| 1084 | - NSString *userAgentString = [self userAgent]; | 1084 | + NSString *tempUserAgentString = [self userAgentString]; |
| 1085 | - if (!userAgentString) { | 1085 | + if (!tempUserAgentString) { |
| 1086 | - userAgentString = [ASIHTTPRequest defaultUserAgentString]; | 1086 | + tempUserAgentString = [ASIHTTPRequest defaultUserAgentString]; |
| 1087 | } | 1087 | } |
| 1088 | - if (userAgentString) { | 1088 | + if (tempUserAgentString) { |
| 1089 | - [self addRequestHeader:@"User-Agent" value:userAgentString]; | 1089 | + [self addRequestHeader:@"User-Agent" value:tempUserAgentString]; |
| 1090 | } | 1090 | } |
| 1091 | } | 1091 | } |
| 1092 | 1092 | ||
| @@ -4991,7 +4991,7 @@ static NSOperationQueue *sharedQueue = nil; | @@ -4991,7 +4991,7 @@ static NSOperationQueue *sharedQueue = nil; | ||
| 4991 | 4991 | ||
| 4992 | @synthesize username; | 4992 | @synthesize username; |
| 4993 | @synthesize password; | 4993 | @synthesize password; |
| 4994 | -@synthesize userAgent; | 4994 | +@synthesize userAgentString; |
| 4995 | @synthesize domain; | 4995 | @synthesize domain; |
| 4996 | @synthesize proxyUsername; | 4996 | @synthesize proxyUsername; |
| 4997 | @synthesize proxyPassword; | 4997 | @synthesize proxyPassword; |
-
Please register or login to post a comment