[Bro-Dev] [Bro-Commits] [git/bro] master: HTTP bug fix reported by Martin. (0e4fecd)

Jonathan Siwek jsiwek at ncsa.illinois.edu
Wed Oct 5 07:28:59 PDT 2011


The way I thought to fix it is in fastpath commit c9a540b9 -- only delay logging when it's known for sure to be 1xx. This way would delay logging if also the status code is unknown, right?  Not sure if it matters much, but I thought my way would be closer to the original behavior.

- Jon

On Oct 5, 2011, at 8:35 AM, Seth Hall wrote:

> Repository : ssh://git@bro-ids.icir.org/bro
> 
> On branch  : master
> Link       : http://tracker.bro-ids.org/bro/changeset/0e4fecdfe4e31200ce00353a633b289fd4724f15/bro
> 
>> ---------------------------------------------------------------
> 
> commit 0e4fecdfe4e31200ce00353a633b289fd4724f15
> Author: Seth Hall <seth at icir.org>
> Date:   Wed Oct 5 09:35:19 2011 -0400
> 
>    HTTP bug fix reported by Martin.
> 
> 
>> ---------------------------------------------------------------
> 
> 0e4fecdfe4e31200ce00353a633b289fd4724f15
> scripts/base/protocols/http/main.bro |    3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/base/protocols/http/main.bro b/scripts/base/protocols/http/main.bro
> index 0faefc4..cbf1224 100644
> --- a/scripts/base/protocols/http/main.bro
> +++ b/scripts/base/protocols/http/main.bro
> @@ -266,7 +266,8 @@ 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];
> 
> _______________________________________________
> bro-commits mailing list
> bro-commits at bro-ids.org
> http://mailman.icsi.berkeley.edu/mailman/listinfo/bro-commits
> 




More information about the bro-dev mailing list