mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix return of content name.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13717 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
856ecc2631
commit
6102cb6edd
1 changed files with 10 additions and 2 deletions
|
@ -1206,7 +1206,7 @@ parseCharacterSet(NSString *token)
|
|||
}
|
||||
if (sscanf([value lossyCString], "%d.%d", &majv, &minv) != 2)
|
||||
{
|
||||
NSLog(@"Bad value for mime-version header");
|
||||
NSLog(@"Bad value for mime-version header (%@)", value);
|
||||
return NO;
|
||||
}
|
||||
[document deleteHeaderNamed: name]; // Should be unique
|
||||
|
@ -1525,6 +1525,14 @@ parseCharacterSet(NSString *token)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int loc;
|
||||
|
||||
[self scanPastSpace: scanner];
|
||||
loc = [scanner scanLocation];
|
||||
value = [[scanner string] substringFromIndex: loc];
|
||||
}
|
||||
|
||||
if (value != nil)
|
||||
{
|
||||
|
@ -2725,7 +2733,7 @@ static NSCharacterSet *tokenSet = nil;
|
|||
*/
|
||||
- (NSString*) contentName
|
||||
{
|
||||
GSMimeHeader *hdr = [self headerNamed: @"content-name"];
|
||||
GSMimeHeader *hdr = [self headerNamed: @"content-type"];
|
||||
|
||||
return [hdr parameterForKey: @"name"];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue