Use NSURL methods instead of CFURL functions

* Replace CFURLCopyUserName with -[NSURL user]
* Replace CFURLCopyPassword with -[NSURL password]
This commit is contained in:
Cédric Luthi 2013-01-18 15:06:14 +01:00
parent c79a2c87a8
commit 74346addea

View file

@ -550,8 +550,8 @@ didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
if ([challenge previousFailureCount] == 0) {
NSURLCredential *credential = nil;
NSString *username = (__bridge_transfer NSString *)CFURLCopyUserName((__bridge CFURLRef)[self.request URL]);
NSString *password = (__bridge_transfer NSString *)CFURLCopyPassword((__bridge CFURLRef)[self.request URL]);
NSString *username = [[self.request URL] user];
NSString *password = [[self.request URL] password];
if (username && password) {
credential = [NSURLCredential credentialWithUser:username password:password persistence:NSURLCredentialPersistenceNone];