mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
tweak
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39853 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5cf471c70f
commit
8180e928f0
1 changed files with 18 additions and 10 deletions
|
@ -6604,9 +6604,18 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
|||
unsigned char *bytes = (unsigned char*)[d bytes];
|
||||
NSUInteger length = [d length];
|
||||
BOOL hadCarriageReturn = NO;
|
||||
BOOL want7Bit = YES;
|
||||
NSUInteger lineLength = 0;
|
||||
NSUInteger i;
|
||||
|
||||
if ([encoding isEqualToString: @"8bit"])
|
||||
{
|
||||
want7Bit = NO;
|
||||
}
|
||||
|
||||
/* Check to see if the data is actually compatible (unaltered)
|
||||
* with the specified content transfer encoding.
|
||||
*/
|
||||
for (i = 0; i < length; i++)
|
||||
{
|
||||
unsigned char c = bytes[i];
|
||||
|
@ -6649,16 +6658,15 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
|||
|
||||
if (encoding != nil)
|
||||
{
|
||||
if (nil == enc)
|
||||
{
|
||||
enc = [self setHeader: @"Content-Transfer-Encoding"
|
||||
value: encoding
|
||||
parameters: nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
[enc setValue: encoding];
|
||||
}
|
||||
/* Not OK ... need to change conten transfer encoding.
|
||||
*/
|
||||
if (YES == want7Bit)
|
||||
{
|
||||
encoding = @"quoted-printable";
|
||||
}
|
||||
enc = [self setHeader: @"Content-Transfer-Encoding"
|
||||
value: encoding
|
||||
parameters: nil];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue