mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Improve raw data output
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13913 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
351d09cae4
commit
de41f901ee
1 changed files with 5 additions and 3 deletions
|
@ -3437,7 +3437,7 @@ static NSCharacterSet *tokenSet = nil;
|
|||
type = [self headerNamed: @"content-type"];
|
||||
}
|
||||
enc = [self headerNamed: @"content-transfer-encoding"];
|
||||
if ([[type parameterForKey: @"type"] isEqual: @"multipart"] == YES)
|
||||
if ([[type objectForKey: @"Type"] isEqual: @"multipart"] == YES)
|
||||
{
|
||||
NSString *v;
|
||||
|
||||
|
@ -3458,7 +3458,7 @@ static NSCharacterSet *tokenSet = nil;
|
|||
else if (enc == nil)
|
||||
{
|
||||
enc = [GSMimeHeader alloc];
|
||||
if ([[type parameterForKey: @"type"] isEqual: @"text"] == YES)
|
||||
if ([[type objectForKey: @"Type"] isEqual: @"text"] == YES)
|
||||
{
|
||||
enc = [enc initWithName: @"content-transfer-encoding"
|
||||
value: @"8bit"
|
||||
|
@ -3512,7 +3512,7 @@ static NSCharacterSet *tokenSet = nil;
|
|||
NSMutableData *part = [[content objectAtIndex: i] rawMimeData];
|
||||
|
||||
[md appendData: part];
|
||||
[md appendBytes: "\r\n--" length: 2];
|
||||
[md appendBytes: "\r\n--" length: 4];
|
||||
[md appendData: boundary];
|
||||
[md appendBytes: "\r\n" length: 2];
|
||||
RELEASE(arp);
|
||||
|
@ -3648,6 +3648,8 @@ static NSCharacterSet *tokenSet = nil;
|
|||
val = [NSString stringWithFormat: @"%@/%@", type, subType];
|
||||
hdr = [GSMimeHeader alloc];
|
||||
hdr = [hdr initWithName: @"content-type" value: val parameters: nil];
|
||||
[hdr setObject: type forKey: @"Type"];
|
||||
[hdr setObject: subType forKey: @"SubType"];
|
||||
if (name != nil)
|
||||
{
|
||||
[hdr setParameter: name forKey: @"name"];
|
||||
|
|
Loading…
Reference in a new issue