mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
Tidy hanbdleing of encoding type
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13922 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
97d7e3f93a
commit
e74f169f9e
1 changed files with 24 additions and 19 deletions
|
@ -3586,11 +3586,12 @@ static NSCharacterSet *tokenSet = nil;
|
|||
}
|
||||
type = [self headerNamed: @"content-type"];
|
||||
}
|
||||
enc = [self headerNamed: @"content-transfer-encoding"];
|
||||
|
||||
if ([[type objectForKey: @"Type"] isEqual: @"multipart"] == YES)
|
||||
{
|
||||
NSString *v;
|
||||
|
||||
enc = [self headerNamed: @"content-transfer-encoding"];
|
||||
if (enc != nil)
|
||||
{
|
||||
[NSException raise: NSInternalInconsistencyException
|
||||
|
@ -3605,9 +3606,12 @@ static NSCharacterSet *tokenSet = nil;
|
|||
}
|
||||
boundary = [v dataUsingEncoding: NSASCIIStringEncoding];
|
||||
}
|
||||
else if (enc == nil)
|
||||
else
|
||||
{
|
||||
d = [self convertToData];
|
||||
enc = [self headerNamed: @"content-transfer-encoding"];
|
||||
if (enc == nil)
|
||||
{
|
||||
enc = [GSMimeHeader alloc];
|
||||
if ([[type objectForKey: @"Type"] isEqual: @"text"] == YES)
|
||||
{
|
||||
|
@ -3635,6 +3639,7 @@ static NSCharacterSet *tokenSet = nil;
|
|||
[self addHeader: enc];
|
||||
RELEASE(enc);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Now build the output.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue