mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +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
db3534f558
commit
e5379ee993
2 changed files with 29 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue