mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +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
4a6d6225b9
commit
bca2d77fe5
2 changed files with 14 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue