Use nested if/else instead of early return in -connection:didReceiveAuthenticationChallenge:
This commit is contained in:
parent
8869bb9ad3
commit
bdab46889b
1 changed files with 20 additions and 21 deletions
|
|
@ -318,9 +318,7 @@ didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
|
||||||
{
|
{
|
||||||
if (self.authenticationBlock) {
|
if (self.authenticationBlock) {
|
||||||
self.authenticationBlock(connection, challenge);
|
self.authenticationBlock(connection, challenge);
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
if ([challenge previousFailureCount] == 0) {
|
if ([challenge previousFailureCount] == 0) {
|
||||||
NSURLCredential *credential = nil;
|
NSURLCredential *credential = nil;
|
||||||
|
|
||||||
|
|
@ -342,6 +340,7 @@ didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
|
||||||
[[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge];
|
[[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)connection:(NSURLConnection *)__unused connection
|
- (void)connection:(NSURLConnection *)__unused connection
|
||||||
didSendBodyData:(NSInteger)bytesWritten
|
didSendBodyData:(NSInteger)bytesWritten
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue