Fix minor bug in returning properties

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10638 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2001-08-02 12:10:46 +00:00
parent d9c02f80ad
commit 80eb611458
2 changed files with 7 additions and 1 deletions

View file

@ -2,6 +2,8 @@
* Source/NSPortNameServer.m: Log the host we are connecting to
when we produce a warning for a failure of a link to gdomap.
* Source/GSHTTPURLHandle.m: ([-propertyForKeyIfAvailable:]) return
nil if the property is not available.
2001-08-01 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -591,7 +591,11 @@ static NSLock *urlLock = nil;
NSString *key = [propertyKey lowercaseString];
NSArray *array = [document headersNamed: key];
if ([array count] == 1)
if ([array count] == 0)
{
return nil;
}
else if ([array count] == 1)
{
result = [[array objectAtIndex: 0] objectForKey: @"BaseValue"];
}