mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
improve logging
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@28422 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
71db6a0871
commit
0a9865e430
1 changed files with 9 additions and 7 deletions
|
@ -1709,22 +1709,22 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
||||||
|
|
||||||
if ([scanner scanInt: &major] == NO || major < 0)
|
if ([scanner scanInt: &major] == NO || major < 0)
|
||||||
{
|
{
|
||||||
NSLog(@"Bad value for http major version");
|
NSLog(@"Bad value for http major version in %@", [scanner string]);
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
if ([scanner scanString: @"." intoString: 0] == NO)
|
if ([scanner scanString: @"." intoString: 0] == NO)
|
||||||
{
|
{
|
||||||
NSLog(@"Bad format for http version");
|
NSLog(@"Bad format for http version in %@", [scanner string]);
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
if ([scanner scanInt: &minor] == NO || minor < 0)
|
if ([scanner scanInt: &minor] == NO || minor < 0)
|
||||||
{
|
{
|
||||||
NSLog(@"Bad value for http minor version");
|
NSLog(@"Bad value for http minor version in %@", [scanner string]);
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
if ([scanner scanInt: &status] == NO || status < 0)
|
if ([scanner scanInt: &status] == NO || status < 0)
|
||||||
{
|
{
|
||||||
NSLog(@"Bad value for http status");
|
NSLog(@"Bad value for http status in %@", [scanner string]);
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
[info setObject: [NSStringClass stringWithFormat: @"%d", minor]
|
[info setObject: [NSStringClass stringWithFormat: @"%d", minor]
|
||||||
|
@ -1761,7 +1761,8 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
||||||
value = [self scanToken: scanner];
|
value = [self scanToken: scanner];
|
||||||
if ([value length] == 0)
|
if ([value length] == 0)
|
||||||
{
|
{
|
||||||
NSLog(@"Bad value for content-transfer-encoding header");
|
NSLog(@"Bad value for content-transfer-encoding header in %@",
|
||||||
|
[scanner string]);
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
value = [value lowercaseString];
|
value = [value lowercaseString];
|
||||||
|
@ -1774,7 +1775,7 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
||||||
type = [self scanName: scanner];
|
type = [self scanName: scanner];
|
||||||
if ([type length] == 0)
|
if ([type length] == 0)
|
||||||
{
|
{
|
||||||
NSLog(@"Invalid Mime content-type");
|
NSLog(@"Invalid Mime content-type in %@", [scanner string]);
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
type = [type lowercaseString];
|
type = [type lowercaseString];
|
||||||
|
@ -1784,7 +1785,8 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
||||||
subtype = [self scanName: scanner];
|
subtype = [self scanName: scanner];
|
||||||
if ([subtype length] == 0)
|
if ([subtype length] == 0)
|
||||||
{
|
{
|
||||||
NSLog(@"Invalid Mime content-type (subtype)");
|
NSLog(@"Invalid Mime content-type (subtype) in %@",
|
||||||
|
[scanner string]);
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
subtype = [subtype lowercaseString];
|
subtype = [subtype lowercaseString];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue