From c9a540b99292cd7e6f610eb4b5a0adb4afd5b24e Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Tue, 4 Oct 2011 14:27:51 -0500 Subject: [PATCH] Add check for optional HTTP::Info status_code. --- scripts/base/protocols/http/main.bro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/base/protocols/http/main.bro b/scripts/base/protocols/http/main.bro index 0faefc4274..139531327c 100644 --- a/scripts/base/protocols/http/main.bro +++ b/scripts/base/protocols/http/main.bro @@ -266,7 +266,7 @@ event http_message_done(c: connection, is_orig: bool, stat: http_message_stat) & { # If the response was an informational 1xx, we're still expecting # the real response later, so we'll continue using the same record. - if ( ! code_in_range(c$http$status_code, 100, 199) ) + if ( ! (c$http?$status_code && code_in_range(c$http$status_code, 100, 199)) ) { Log::write(HTTP::LOG, c$http); delete c$http_state$pending[c$http_state$current_response];