more detailed debug

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11838 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2001-12-19 23:04:28 +00:00
parent 1e8939a868
commit d8e0fb1a5f
2 changed files with 17 additions and 6 deletions

View file

@ -308,7 +308,10 @@ static void debugWrite(NSData *data)
* Don't start a load if one is in progress. * Don't start a load if one is in progress.
*/ */
if (connectionState != idle) if (connectionState != idle)
{
NSLog(@"Attempt to load an http handle which is not idle ... ignored");
return; return;
}
[dat setLength: 0]; [dat setLength: 0];
RELEASE(document); RELEASE(document);
@ -316,8 +319,11 @@ static void debugWrite(NSData *data)
parser = [GSMimeParser new]; parser = [GSMimeParser new];
document = RETAIN([parser document]); document = RETAIN([parser document]);
[self beginLoadInBackground]; [self beginLoadInBackground];
if (sock != nil)
{
[sock closeFile]; [sock closeFile];
DESTROY(sock); DESTROY(sock);
}
contentLength = 0; contentLength = 0;
if ([[request objectForKey: GSHTTPPropertyProxyHostKey] length] == 0) if ([[request objectForKey: GSHTTPPropertyProxyHostKey] length] == 0)
{ {

View file

@ -2077,10 +2077,12 @@ parseCharacterSet(NSString *token)
- (BOOL) _unfoldHeader - (BOOL) _unfoldHeader
{ {
char c = 0; char c;
BOOL unwrappingComplete = NO; BOOL unwrappingComplete = NO;
lineStart = lineEnd; lineStart = lineEnd;
NSDebugMLLog(@"GSMime", @"entry: input:%u dataEnd:%u lineStart:%u '%*.*s'",
input, dataEnd, lineStart, dataEnd - input, dataEnd - input, &bytes[input]);
/* /*
* RFC822 lets header fields break across lines, with continuation * RFC822 lets header fields break across lines, with continuation
* lines beginning with whitespace. This is called folding - and the * lines beginning with whitespace. This is called folding - and the
@ -2099,7 +2101,7 @@ parseCharacterSet(NSString *token)
} }
if (pos == dataEnd) if (pos == dataEnd)
{ {
return NO; /* need more data */ break; /* need more data */
} }
pos++; pos++;
if (c == '\r' && pos < dataEnd && bytes[pos] == '\n') if (c == '\r' && pos < dataEnd && bytes[pos] == '\n')
@ -2108,7 +2110,7 @@ parseCharacterSet(NSString *token)
} }
if (pos == dataEnd) if (pos == dataEnd)
{ {
return NO; /* need more data */ break; /* need more data */
} }
/* /*
* Copy data up to end of line, and skip past end. * Copy data up to end of line, and skip past end.
@ -2163,6 +2165,9 @@ parseCharacterSet(NSString *token)
} }
} }
} }
NSDebugMLLog(@"GSMime", @"exit: inBody:%d unwrappingComplete: %d "
@"input:%u dataEnd:%u lineStart:%u '%*.*s'", inBody, unwrappingComplete,
input, dataEnd, lineStart, dataEnd - input, dataEnd - input, &bytes[input]);
return unwrappingComplete; return unwrappingComplete;
} }
@end @end