Fix error in last mod

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24755 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2007-03-02 15:57:57 +00:00
parent 4a89c7967e
commit b7ac74a927

View file

@ -460,13 +460,20 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
password: [u password] password: [u password]
persistence: NSURLCredentialPersistenceForSession]; persistence: NSURLCredentialPersistenceForSession];
/* Create authentication from credential ... returns nil if if (cred == nil)
* we have no credential. {
*/ authentication = nil;
authentication = [GSHTTPAuthentication }
authenticationWithCredential: cred else
inProtectionSpace: space]; {
RELEASE(cred); /* Create authentication from credential ... returns nil if
* we have no credential.
*/
authentication = [GSHTTPAuthentication
authenticationWithCredential: cred
inProtectionSpace: space];
RELEASE(cred);
}
method = [request objectForKey: GSHTTPPropertyMethodKey]; method = [request objectForKey: GSHTTPPropertyMethodKey];
if (method == nil) if (method == nil)
@ -644,7 +651,11 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
ac = [ah value]; ac = [ah value];
space = [GSHTTPAuthentication space = [GSHTTPAuthentication
protectionSpaceForAuthentication: ac requestURL: url]; protectionSpaceForAuthentication: ac requestURL: url];
if (space != nil) if (space == nil)
{
authentication = nil;
}
else
{ {
NSURLCredential *cred; NSURLCredential *cred;
@ -658,19 +669,22 @@ static void debugWrite(GSHTTPURLHandle *handle, NSData *data)
password: [url password] password: [url password]
persistence: NSURLCredentialPersistenceForSession]; persistence: NSURLCredentialPersistenceForSession];
/* if (cred == nil)
* Get the digest object and ask it for a header {
* to use for authorisation. authentication = nil;
* Returns nil if we have no credential. }
*/ else
authentication = [GSHTTPAuthentication {
authenticationWithCredential: cred /*
inProtectionSpace: space]; * Get the digest object and ask it for a header
RELEASE(cred); * to use for authorisation.
} * Returns nil if we have no credential.
else */
{ authentication = [GSHTTPAuthentication
authentication = nil; authenticationWithCredential: cred
inProtectionSpace: space];
RELEASE(cred);
}
} }
method = [request objectForKey: GSHTTPPropertyMethodKey]; method = [request objectForKey: GSHTTPPropertyMethodKey];