Use nested if/else instead of early return in -connection:didReceiveAuthenticationChallenge:

This commit is contained in:
Mattt Thompson 2012-01-10 13:41:36 -08:00
parent 8869bb9ad3
commit bdab46889b

View file

@ -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