mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
Merge branch 'master' of git.bro.org:bro
This commit is contained in:
commit
d8adcae3ba
12 changed files with 227 additions and 138 deletions
|
@ -1209,7 +1209,15 @@ int HTTP_Analyzer::HTTP_RequestLine(const char* line, const char* end_of_line)
|
|||
const char* end_of_method = get_HTTP_token(line, end_of_line);
|
||||
|
||||
if ( end_of_method == line )
|
||||
{
|
||||
// something went wrong with get_HTTP_token
|
||||
// perform a weak test to see if the string "HTTP/"
|
||||
// is found at the end of the RequestLine
|
||||
if ( end_of_line - 9 >= line && strncasecmp(end_of_line - 9, " HTTP/", 6) == 0 )
|
||||
goto bad_http_request_with_version;
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
rest = skip_whitespace(end_of_method, end_of_line);
|
||||
|
||||
|
@ -1230,6 +1238,10 @@ int HTTP_Analyzer::HTTP_RequestLine(const char* line, const char* end_of_line)
|
|||
|
||||
return 1;
|
||||
|
||||
bad_http_request_with_version:
|
||||
reporter->Weird(Conn(), "bad_HTTP_request_with_version");
|
||||
return 0;
|
||||
|
||||
error:
|
||||
reporter->Weird(Conn(), "bad_HTTP_request");
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue