Skip to content

Commit

Permalink
Rename the username variable to user
Browse files Browse the repository at this point in the history
  • Loading branch information
0xced committed Jan 18, 2013
1 parent 74346ad commit 7abc978
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions AFNetworking/AFURLConnectionOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -550,13 +550,13 @@ - (void)connection:(NSURLConnection *)connection
if ([challenge previousFailureCount] == 0) {
NSURLCredential *credential = nil;

NSString *username = [[self.request URL] user];
NSString *user = [[self.request URL] user];
NSString *password = [[self.request URL] password];

if (username && password) {
credential = [NSURLCredential credentialWithUser:username password:password persistence:NSURLCredentialPersistenceNone];
} else if (username) {
credential = [[[NSURLCredentialStorage sharedCredentialStorage] credentialsForProtectionSpace:[challenge protectionSpace]] objectForKey:username];
if (user && password) {
credential = [NSURLCredential credentialWithUser:user password:password persistence:NSURLCredentialPersistenceNone];
} else if (user) {
credential = [[[NSURLCredentialStorage sharedCredentialStorage] credentialsForProtectionSpace:[challenge protectionSpace]] objectForKey:user];
} else {
credential = [[NSURLCredentialStorage sharedCredentialStorage] defaultCredentialForProtectionSpace:[challenge protectionSpace]];
}
Expand Down

0 comments on commit 7abc978

Please sign in to comment.