Fix use of authentication credential from URL by Sergei Golovin

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39502 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2016-03-09 14:50:40 +00:00
parent d5f56756ac
commit aaf7f02758
2 changed files with 10 additions and 3 deletions

View file

@ -791,7 +791,7 @@ static NSStringEncoding defaultEncoding;
- (BOOL) createDirectoryAtPath: (NSString *)path
withIntermediateDirectories: (BOOL)flag
attributes: (NSDictionary *)attributes
error: (NSError **) error
error: (NSError **)error
{
BOOL result = NO;

View file

@ -263,8 +263,15 @@ typedef struct
- (void) connection: (NSURLConnection *)connection
didReceiveAuthenticationChallenge: (NSURLAuthenticationChallenge *)challenge
{
[[challenge sender]
continueWithoutCredentialForAuthenticationChallenge: challenge];
if ([challenge proposedCredential] == nil
|| [challenge previousFailureCount] > 0)
{
/* continue without a credential if there is no proposed credential
* at all or if an authentication failure has already happened.
*/
[[challenge sender]
continueWithoutCredentialForAuthenticationChallenge: challenge];
}
}
- (void) connection: (NSURLConnection *)connection