mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-15 16:11:42 +00:00
Improve ignoring of connections.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@20180 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b3b6e74592
commit
d50f4ea8e6
1 changed files with 24 additions and 3 deletions
27
WebServer.m
27
WebServer.m
|
@ -826,11 +826,25 @@ unescapeData(const unsigned char* bytes, unsigned length, unsigned char *buf)
|
|||
|
||||
if ((h = [NSHost hostWithAddress: a]) == nil)
|
||||
{
|
||||
[self _alert: @"Unknown host (%@) on new connection.", a];
|
||||
/*
|
||||
* Don't log this in quiet mode as it could just be a
|
||||
* test connection that we are ignoring.
|
||||
*/
|
||||
if ([_quiet containsObject: a] == NO)
|
||||
{
|
||||
[self _alert: @"Unknown host (%@) on new connection.", a];
|
||||
}
|
||||
}
|
||||
else if (_hosts != nil && [_hosts containsObject: a] == NO)
|
||||
{
|
||||
[self _alert: @"Invalid host (%@) on new connection.", a];
|
||||
/*
|
||||
* Don't log this in quiet mode as it could just be a
|
||||
* test connection that we are ignoring.
|
||||
*/
|
||||
if ([_quiet containsObject: a] == NO)
|
||||
{
|
||||
[self _alert: @"Invalid host (%@) on new connection.", a];
|
||||
}
|
||||
}
|
||||
else if (_maxPerHost > 0 && [_perHost countForObject: a] >= _maxPerHost)
|
||||
{
|
||||
|
@ -838,7 +852,14 @@ unescapeData(const unsigned char* bytes, unsigned length, unsigned char *buf)
|
|||
}
|
||||
else if (_sslConfig != nil && [hdl sslAccept] == NO)
|
||||
{
|
||||
[self _alert: @"SSL accept fail on new connection (%@).", a];
|
||||
/*
|
||||
* Don't log this in quiet mode as it could just be a
|
||||
* test connection that we are ignoring.
|
||||
*/
|
||||
if ([_quiet containsObject: a] == NO)
|
||||
{
|
||||
[self _alert: @"SSL accept fail on new connection (%@).", a];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue