mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-16 00:21:39 +00:00
Improve logging/alerting
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@20265 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2dc83bf6e3
commit
9d3ccce0a5
2 changed files with 17 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Oct 28 08:45:00 2004 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* WebServer.m: Don't generate alert about connection with empty
|
||||
request if we have lready handled a request and reset.
|
||||
|
||||
Tue Oct 26 16:50:00 2004 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* SQLClient.m: debug and duration logging should be turned off
|
||||
|
|
13
WebServer.m
13
WebServer.m
|
@ -36,10 +36,12 @@
|
|||
NSTimeInterval ticked;
|
||||
BOOL processing;
|
||||
BOOL shouldEnd;
|
||||
BOOL hasReset;
|
||||
}
|
||||
- (NSString*) address;
|
||||
- (NSMutableData*) buffer;
|
||||
- (NSFileHandle*) handle;
|
||||
- (BOOL) hasReset;
|
||||
- (unsigned) moreBytes: (unsigned)count;
|
||||
- (GSMimeParser*) parser;
|
||||
- (BOOL) processing;
|
||||
|
@ -87,6 +89,11 @@
|
|||
return handle;
|
||||
}
|
||||
|
||||
- (BOOL) hasReset
|
||||
{
|
||||
return hasReset;
|
||||
}
|
||||
|
||||
- (unsigned) moreBytes: (unsigned)count
|
||||
{
|
||||
byteCount += count;
|
||||
|
@ -105,6 +112,7 @@
|
|||
|
||||
- (void) reset
|
||||
{
|
||||
hasReset = YES;
|
||||
[self setBuffer: [NSMutableData dataWithCapacity: 1024]];
|
||||
[self setParser: nil];
|
||||
[self setProcessing: NO];
|
||||
|
@ -923,10 +931,13 @@ unescapeData(const unsigned char* bytes, unsigned length, unsigned char *buf)
|
|||
if ([buffer length] == 0)
|
||||
{
|
||||
/*
|
||||
* Don't log if we have already reset after handling
|
||||
* a request.
|
||||
* Don't log this in quiet mode as it could just be a
|
||||
* test connection that we are ignoring.
|
||||
*/
|
||||
if ([_quiet containsObject: [session address]] == NO)
|
||||
if ([session hasReset] == NO
|
||||
&& [_quiet containsObject: [session address]] == NO)
|
||||
{
|
||||
[self _alert: @"%@ read end-of-file in empty request",
|
||||
session];
|
||||
|
|
Loading…
Reference in a new issue