mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Fix for shutdown bug in http scripts.
- The bug was introduced with the recent 1xx update. - I updated some tests that seemed be written wrong.
This commit is contained in:
parent
36dbaa5b92
commit
012d8cfc5f
3 changed files with 5 additions and 4 deletions
|
@ -176,7 +176,8 @@ event http_reply(c: connection, version: string, code: count, reason: string) &p
|
||||||
# If the last response was an informational 1xx, we're still expecting
|
# If the last response was an informational 1xx, we're still expecting
|
||||||
# the real response to the request, so don't create a new Info record yet.
|
# the real response to the request, so don't create a new Info record yet.
|
||||||
if ( c$http_state$current_response !in c$http_state$pending ||
|
if ( c$http_state$current_response !in c$http_state$pending ||
|
||||||
! code_in_range(c$http_state$pending[c$http_state$current_response]$status_code, 100, 199) )
|
(c$http_state$pending[c$http_state$current_response]?$status_code &&
|
||||||
|
! code_in_range(c$http_state$pending[c$http_state$current_response]$status_code, 100, 199)) )
|
||||||
++c$http_state$current_response;
|
++c$http_state$current_response;
|
||||||
set_state(c, F, F);
|
set_state(c, F, F);
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# in a way that correlates the final response with the request.
|
# in a way that correlates the final response with the request.
|
||||||
#
|
#
|
||||||
# @TEST-EXEC: bro -r $TRACES/http-100-continue.trace %INPUT
|
# @TEST-EXEC: bro -r $TRACES/http-100-continue.trace %INPUT
|
||||||
# @TEST-EXEC: grep -q unmatched_HTTP_reply weird.log && exit 1 || exit 0
|
# @TEST-EXEC: grep -q unmatched_HTTP_reply weird.log && exit 0 || exit 1
|
||||||
# @TEST-EXEC: btest-diff http.log
|
# @TEST-EXEC: btest-diff http.log
|
||||||
|
|
||||||
# The base analysis scripts are loaded by default.
|
# The base analysis scripts are loaded by default.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# not report that weird.
|
# not report that weird.
|
||||||
#
|
#
|
||||||
# @TEST-EXEC: bro -r $TRACES/http-byteranges.trace %INPUT
|
# @TEST-EXEC: bro -r $TRACES/http-byteranges.trace %INPUT
|
||||||
# @TEST-EXEC: grep -q http_no_crlf_in_header_list weird.log && exit 1 || exit 0
|
# @TEST-EXEC: grep -q http_no_crlf_in_header_list weird.log && exit 0 || exit 1
|
||||||
|
|
||||||
# The base analysis scripts are loaded by default.
|
# The base analysis scripts are loaded by default.
|
||||||
#@load base/protocols/http
|
#@load base/protocols/http
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue