Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Rename userAgent -> userAgentString #310

Merged
merged 1 commit into from

1 participant

erik chen
erik chen
Collaborator

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

#309

erik chen erikchen Rename userAgent -> userAgentString
Apparently Apple doesn't like it when asi-http synthesizes userAgent.

pokeb#309
6ef10d3
erik chen erikchen merged commit 6cf5f08 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 6, 2012
  1. erik chen

    Rename userAgent -> userAgentString

    erikchen authored
    Apparently Apple doesn't like it when asi-http synthesizes userAgent.
    
    pokeb#309
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 9 deletions.
  1. +2 −2 Classes/ASIHTTPRequest.h
  2. +7 −7 Classes/ASIHTTPRequest.m
4 Classes/ASIHTTPRequest.h
View
@@ -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;
14 Classes/ASIHTTPRequest.m
View
@@ -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;
Something went wrong with that request. Please try again.