mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fix bug encoding long headers without spaces
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39752 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8842de896f
commit
d0e1834a37
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-05-13 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/GSMime.m:
|
||||
Fix bug encoding very long headers with no whitespace to fold on.
|
||||
|
||||
2016-05-06 18:03-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||
|
||||
* Headers/Foundation/NSString.h: Add containsString:
|
||||
|
|
|
@ -4058,8 +4058,15 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
|||
/* We have more text to output, so fold the line.
|
||||
*/
|
||||
[m appendBytes: "\r\n" length: 2];
|
||||
[m appendBytes: ptr + pos length: 1];
|
||||
pos++;
|
||||
if (isspace(ptr[pos]))
|
||||
{
|
||||
[m appendBytes: ptr + pos length: 1];
|
||||
pos++;
|
||||
}
|
||||
else
|
||||
{
|
||||
[m appendBytes: " " length: 1];
|
||||
}
|
||||
offset = 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue