mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Minor bugfix parsing http headers
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25502 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
05b575be38
commit
befaf43dd6
2 changed files with 29 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-09-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/GSMime.m: Decode headers as latin1 by default if
|
||||
parsing http rather than mime.
|
||||
|
||||
2007-09-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
Update files to use LGPL3 and GLP3 licenses.
|
||||
|
|
|
@ -2234,9 +2234,18 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
|||
if (dst > beg)
|
||||
{
|
||||
s = [NSStringClass allocWithZone: NSDefaultMallocZone()];
|
||||
s = [s initWithBytes: beg
|
||||
length: dst - beg
|
||||
encoding: NSASCIIStringEncoding];
|
||||
if (flags.isHttp == 1)
|
||||
{
|
||||
s = [s initWithBytes: beg
|
||||
length: dst - beg
|
||||
encoding: NSISOLatin1StringEncoding];
|
||||
}
|
||||
else
|
||||
{
|
||||
s = [s initWithBytes: beg
|
||||
length: dst - beg
|
||||
encoding: NSASCIIStringEncoding];
|
||||
}
|
||||
if (s == nil && _defaultEncoding != NSASCIIStringEncoding)
|
||||
{
|
||||
s = [NSStringClass allocWithZone: NSDefaultMallocZone()];
|
||||
|
@ -2347,9 +2356,18 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
|||
if (dst > beg)
|
||||
{
|
||||
s = [NSStringClass allocWithZone: NSDefaultMallocZone()];
|
||||
s = [s initWithBytes: beg
|
||||
length: dst - beg
|
||||
encoding: NSASCIIStringEncoding];
|
||||
if (flags.isHttp == 1)
|
||||
{
|
||||
s = [s initWithBytes: beg
|
||||
length: dst - beg
|
||||
encoding: NSISOLatin1StringEncoding];
|
||||
}
|
||||
else
|
||||
{
|
||||
s = [s initWithBytes: beg
|
||||
length: dst - beg
|
||||
encoding: NSASCIIStringEncoding];
|
||||
}
|
||||
if (s == nil && _defaultEncoding != NSASCIIStringEncoding)
|
||||
{
|
||||
s = [NSStringClass allocWithZone: NSDefaultMallocZone()];
|
||||
|
|
Loading…
Reference in a new issue