mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
tweak again
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39849 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
73f18a6998
commit
407d06d7b4
1 changed files with 23 additions and 6 deletions
|
@ -5738,25 +5738,42 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
|||
|| YES == [v isEqualToString: @"binary"]
|
||||
|| YES == [v isEqualToString: @"8bit"])
|
||||
{
|
||||
NSString *t = [[self headerNamed: @"content-type"] value];
|
||||
GSMimeHeader *t = [self headerNamed: @"content-type"];
|
||||
NSString *v;
|
||||
|
||||
if (YES == [t hasPrefix: @"text/"])
|
||||
if ([[t objectForKey: @"Type"] isEqualToString: @"text"] == YES)
|
||||
{
|
||||
t = @"quoted-printable";
|
||||
NSString *charset;
|
||||
NSStringEncoding e;
|
||||
|
||||
charset = [t parameterForKey: @"charset"];
|
||||
e = [documentClass encodingFromCharset: charset];
|
||||
#if defined(NeXT_Foundation_LIBRARY)
|
||||
if (e != NSASCIIStringEncoding)
|
||||
#else
|
||||
if (e != NSASCIIStringEncoding && e != NSUTF7StringEncoding)
|
||||
#endif
|
||||
{
|
||||
v = @"quoted-printable";
|
||||
}
|
||||
else
|
||||
{
|
||||
v = @"7bit";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
t = @"base64";
|
||||
v = @"base64";
|
||||
}
|
||||
if (nil == h)
|
||||
{
|
||||
[self setHeader: @"Content-Transfer-Encoding"
|
||||
value: t
|
||||
value: v
|
||||
parameters: nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
[h setValue: t];
|
||||
[h setValue: v];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue