Permalink
Browse files

Try to continue request if we don't have credentials

  • Loading branch information...
1 parent 3b9db92 commit 4c81af3dc3f9eab3481d3c6a340eaac4555b4056 @phoboslab committed Nov 2, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 Classes/Ejecta/EJUtils/EJBindingHttpRequest.m
@@ -53,11 +53,14 @@ - (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticatio
persistence:NSURLCredentialPersistenceNone];
[[challenge sender] useCredential:credentials forAuthenticationChallenge:challenge];
}
+ else if( [challenge previousFailureCount] == 0 ) {
+ [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge];
+ }
else {
[[challenge sender] cancelAuthenticationChallenge:challenge];
state = kEJHttpRequestStateDone;
[self triggerEvent:@"abort" argc:0 argv:NULL];
- NSLog(@"XHR: Aborting Request %@ - wrong or no credentials", url);
+ NSLog(@"XHR: Aborting Request %@ - wrong credentials", url);
}
}

0 comments on commit 4c81af3

Please sign in to comment.