Rename the username variable to user

This commit is contained in:
Cédric Luthi 2013-01-18 15:08:29 +01:00
parent 74346addea
commit 7abc97881e

View file

@ -550,13 +550,13 @@ didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
if ([challenge previousFailureCount] == 0) { if ([challenge previousFailureCount] == 0) {
NSURLCredential *credential = nil; NSURLCredential *credential = nil;
NSString *username = [[self.request URL] user]; NSString *user = [[self.request URL] user];
NSString *password = [[self.request URL] password]; NSString *password = [[self.request URL] password];
if (username && password) { if (user && password) {
credential = [NSURLCredential credentialWithUser:username password:password persistence:NSURLCredentialPersistenceNone]; credential = [NSURLCredential credentialWithUser:user password:password persistence:NSURLCredentialPersistenceNone];
} else if (username) { } else if (user) {
credential = [[[NSURLCredentialStorage sharedCredentialStorage] credentialsForProtectionSpace:[challenge protectionSpace]] objectForKey:username]; credential = [[[NSURLCredentialStorage sharedCredentialStorage] credentialsForProtectionSpace:[challenge protectionSpace]] objectForKey:user];
} else { } else {
credential = [[NSURLCredentialStorage sharedCredentialStorage] defaultCredentialForProtectionSpace:[challenge protectionSpace]]; credential = [[NSURLCredentialStorage sharedCredentialStorage] defaultCredentialForProtectionSpace:[challenge protectionSpace]];
} }