mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 17:41:05 +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"];
|
type = [self headerNamed: @"content-type"];
|
||||||
}
|
}
|
||||||
enc = [self headerNamed: @"content-transfer-encoding"];
|
|
||||||
if ([[type objectForKey: @"Type"] isEqual: @"multipart"] == YES)
|
if ([[type objectForKey: @"Type"] isEqual: @"multipart"] == YES)
|
||||||
{
|
{
|
||||||
NSString *v;
|
NSString *v;
|
||||||
|
|
||||||
|
enc = [self headerNamed: @"content-transfer-encoding"];
|
||||||
if (enc != nil)
|
if (enc != nil)
|
||||||
{
|
{
|
||||||
[NSException raise: NSInternalInconsistencyException
|
[NSException raise: NSInternalInconsistencyException
|
||||||
|
@ -3605,9 +3606,12 @@ static NSCharacterSet *tokenSet = nil;
|
||||||
}
|
}
|
||||||
boundary = [v dataUsingEncoding: NSASCIIStringEncoding];
|
boundary = [v dataUsingEncoding: NSASCIIStringEncoding];
|
||||||
}
|
}
|
||||||
else if (enc == nil)
|
else
|
||||||
{
|
{
|
||||||
d = [self convertToData];
|
d = [self convertToData];
|
||||||
|
enc = [self headerNamed: @"content-transfer-encoding"];
|
||||||
|
if (enc == nil)
|
||||||
|
{
|
||||||
enc = [GSMimeHeader alloc];
|
enc = [GSMimeHeader alloc];
|
||||||
if ([[type objectForKey: @"Type"] isEqual: @"text"] == YES)
|
if ([[type objectForKey: @"Type"] isEqual: @"text"] == YES)
|
||||||
{
|
{
|
||||||
|
@ -3635,6 +3639,7 @@ static NSCharacterSet *tokenSet = nil;
|
||||||
[self addHeader: enc];
|
[self addHeader: enc];
|
||||||
RELEASE(enc);
|
RELEASE(enc);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now build the output.
|
* Now build the output.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue