mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix possible exception setting header value
This commit is contained in:
parent
b8aedfc53e
commit
3631c4b068
2 changed files with 11 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2022-02-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/GSMime.m: ([GSMimeHeader setValue:]) do not set
|
||||
type/subtype information if the content-type header value is not
|
||||
in that format.
|
||||
|
||||
2022-01-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSHTTPURLHandle.m: fix incorrect close of socket at the end
|
||||
|
|
|
@ -4688,8 +4688,11 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
|||
NSArray *a;
|
||||
|
||||
a = [[value lowercaseString] componentsSeparatedByString: @"/"];
|
||||
[self setObject: [a objectAtIndex: 0] forKey: @"Type"];
|
||||
[self setObject: [a objectAtIndex: 1] forKey: @"Subtype"];
|
||||
if ([a count] == 2)
|
||||
{
|
||||
[self setObject: [a objectAtIndex: 0] forKey: @"Type"];
|
||||
[self setObject: [a objectAtIndex: 1] forKey: @"Subtype"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue