diff --git a/ChangeLog b/ChangeLog index 71a10be25..a0e73c797 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/Source/GSHTTPURLHandle.m b/Source/GSHTTPURLHandle.m index ff2941276..d226fa8cf 100644 --- a/Source/GSHTTPURLHandle.m +++ b/Source/GSHTTPURLHandle.m @@ -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"]; }