mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
Remove old string functions.
More specifically, this removes the functions: strcasecmp_n strchr_n strrchr_n and replaces the calls with the respective C-library calls that should be part of just about all operating systems by now.
This commit is contained in:
parent
611a8ab935
commit
446a44787a
7 changed files with 11 additions and 51 deletions
|
@ -1370,7 +1370,7 @@ void HTTP_Analyzer::HTTP_Request()
|
|||
const char* method = (const char*) request_method->AsString()->Bytes();
|
||||
int method_len = request_method->AsString()->Len();
|
||||
|
||||
if ( strcasecmp_n(method_len, method, "CONNECT") == 0 )
|
||||
if ( strncasecmp(method, "CONNECT", method_len) == 0 )
|
||||
connect_request = true;
|
||||
|
||||
if ( http_request )
|
||||
|
@ -1564,7 +1564,7 @@ int HTTP_Analyzer::ExpectReplyMessageBody()
|
|||
|
||||
const BroString* method = UnansweredRequestMethod();
|
||||
|
||||
if ( method && strcasecmp_n(method->Len(), (const char*) (method->Bytes()), "HEAD") == 0 )
|
||||
if ( method && strncasecmp((const char*) (method->Bytes()), "HEAD", method->Len()) == 0 )
|
||||
return HTTP_BODY_NOT_EXPECTED;
|
||||
|
||||
if ( (reply_code >= 100 && reply_code < 200) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue