From 51d6c638604843d543f0a9f5d8d08653dd2edf1e Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 15 Jul 2013 15:38:13 +0200 Subject: [PATCH] Luajit: fix compilation and tests after libhtp upgrade --- src/detect-luajit.c | 88 +++++++++++---------------------------------- 1 file changed, 21 insertions(+), 67 deletions(-) diff --git a/src/detect-luajit.c b/src/detect-luajit.c index c22ec29da6..7d7b92bb2d 100644 --- a/src/detect-luajit.c +++ b/src/detect-luajit.c @@ -392,7 +392,7 @@ static int DetectLuajitMatch (ThreadVars *tv, DetectEngineThreadCtx *det_ctx, if (tluajit->alproto == ALPROTO_HTTP) { FLOWLOCK_RDLOCK(p->flow); HtpState *htp_state = p->flow->alstate; - if (htp_state != NULL && htp_state->connp != NULL && htp_state->connp->conn != NULL) { + if (htp_state != NULL && htp_state->connp != NULL) { htp_tx_t *tx = NULL; uint64_t idx = AppLayerTransactionGetInspectId(p->flow, 0); uint64_t total_txs= AppLayerGetTxCnt(ALPROTO_HTTP, htp_state); @@ -916,18 +916,10 @@ static int LuajitMatchTest01(void) { int result = 0; uint8_t httpbuf1[] = "POST / HTTP/1.1\r\n" - "Host: www.emergingthreats.net\r\n" - "User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.0.13) Gecko/2009080315 Ubuntu/8.10 (intrepid) Firefox/3.0.13\r\n" - "Accept: text/html,application/xhtml+xml,application/xml;q=0.9;q=0.8\r\n"; + "Host: www.emergingthreats.net\r\n\r\n"; uint8_t httpbuf2[] = - "Accept-Language: es-es,es;q=0.8,en-us;q=0.5,en;q=0.3\r\n" - "Accept-Encoding: gzip,deflate\r\n" - "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n" - "Date: Tue, 22 Sep 2009 19:24:48 GMT\r\n" - "Server: Apache\r\n" - "Content-Length: 500\r\n" - "\r\n" - "