mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Try to ensure that headers with non-ascii characters are encoded properly (and at least don't cause an exception).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39873 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
0d98f56eca
commit
8183cd9557
3 changed files with 46 additions and 25 deletions
|
@ -547,15 +547,20 @@ debugWrite(GSHTTPURLHandle *handle, NSData *data)
|
|||
}
|
||||
}
|
||||
|
||||
buf = [[s dataUsingEncoding: NSISOLatin1StringEncoding] mutableCopy];
|
||||
|
||||
enumerator = NSEnumerateMapTable(wProperties);
|
||||
while (NSNextMapEnumeratorPair(&enumerator, (void **)(&key), (void**)&val))
|
||||
{
|
||||
[s appendFormat: @"%@: %@\r\n", key, val];
|
||||
GSMimeHeader *h;
|
||||
|
||||
h = [[GSMimeHeader alloc] initWithName: key value: val parameters: nil];
|
||||
[buf appendData: [h rawMimeDataPreservingCase: YES foldedAt: 0]];
|
||||
RELEASE(h);
|
||||
}
|
||||
NSEndMapTableEnumeration(&enumerator);
|
||||
|
||||
[s appendString: @"\r\n"];
|
||||
buf = [[s dataUsingEncoding: NSASCIIStringEncoding] mutableCopy];
|
||||
[buf appendBytes: "\r\n" length: 2];
|
||||
|
||||
/*
|
||||
* Append any data to be sent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue