Permalink
Browse files

Rename the `username` variable to `user`

  • Loading branch information...
1 parent 74346ad commit 7abc97881e66b7846d1262877efa523ccdb740eb @0xced 0xced committed Jan 18, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 AFNetworking/AFURLConnectionOperation.m
@@ -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]];
}

0 comments on commit 7abc978

Please sign in to comment.