From 87734b9320551143d2954b5a7c9b12341be4ef9d Mon Sep 17 00:00:00 2001 From: fengweihao Date: Tue, 20 Aug 2019 13:48:38 +0800 Subject: [PATCH] =?UTF-8?q?close=20#158=20pang=5Fscan=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?host=E5=AF=B9TSG=5FOBJ=5FFQDN=E7=9A=84=E6=89=AB=E6=8F=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/business/pangu-http/src/pangu_http.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugin/business/pangu-http/src/pangu_http.cpp b/plugin/business/pangu-http/src/pangu_http.cpp index 6194bce..a9f77e2 100644 --- a/plugin/business/pangu-http/src/pangu_http.cpp +++ b/plugin/business/pangu-http/src/pangu_http.cpp @@ -1854,6 +1854,16 @@ enum pangu_action http_scan(const struct tfe_http_session * session, enum tfe_ht if (events & EV_HTTP_REQ_HDR) { + const char *str_host = session->req->req_spec.host; + int str_host_length = (int) (strlen(session->req->req_spec.host)); + + scan_ret = Maat_full_scan_string(g_pangu_rt->maat, g_pangu_rt->scan_table_id[PXY_CTRL_HTTP_URL], + CHARSET_UTF8, str_host, str_host_length, result, NULL, MAX_SCAN_RESULT, &(ctx->scan_mid), ctx->thread_id); + if (scan_ret > 0) + { + hit_cnt += scan_ret; + } + const char * str_url = session->req->req_spec.url; int str_url_length = (int) (strlen(session->req->req_spec.url));