From 057031acce9a4b646dc87e351346b54614cf3da1 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 26 Mar 2010 12:07:22 +0100 Subject: [PATCH] Don't inspect more methods than necessary. --- src/detect-http-method.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/detect-http-method.c b/src/detect-http-method.c index a560ed6999..fa01610b8b 100644 --- a/src/detect-http-method.c +++ b/src/detect-http-method.c @@ -83,8 +83,8 @@ int DetectHttpMethodMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx, } SCMutexLock(&f->m); - for ( idx = hs->new_in_tx_index; - idx < list_size(hs->connp->conn->transactions); idx++) + for (idx = hs->new_in_tx_index; + idx < list_size(hs->connp->conn->transactions); idx++) { tx = list_get(hs->connp->conn->transactions, idx); if (tx == NULL) @@ -107,6 +107,7 @@ int DetectHttpMethodMatch(ThreadVars *t, DetectEngineThreadCtx *det_ctx, SCLogDebug("Matched raw HTTP method values."); ret = 1; + break; } } }