aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/protocols/http.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c
index 7db270212..9f2a59fc4 100644
--- a/src/lib/protocols/http.c
+++ b/src/lib/protocols/http.c
@@ -105,7 +105,7 @@ static ndpi_protocol_category_t ndpi_http_check_content(struct ndpi_detection_mo
const char *app = (const char *)&packet->content_line.ptr[app_len];
u_int app_len_avail = packet->content_line.len-app_len;
- if(ndpi_strncasestr(app, "mpeg", app_len_avail) != NULL) {
+ if(strncasecmp(app, "mpeg", app_len_avail) == 0) {
flow->guessed_category = flow->category = NDPI_PROTOCOL_CATEGORY_STREAMING;
return(flow->category);
} else if(app_len_avail > 3) {
@@ -121,7 +121,7 @@ static ndpi_protocol_category_t ndpi_http_check_content(struct ndpi_detection_mo
u_int8_t i;
for(i = 0; cmp_mimes[i] != NULL; i++) {
- if(ndpi_strncasestr(app, cmp_mimes[i], app_len_avail) != NULL) {
+ if(strncasecmp(app, cmp_mimes[i], app_len_avail) == 0) {
flow->guessed_category = flow->category = NDPI_PROTOCOL_CATEGORY_DOWNLOAD_FT;
NDPI_SET_BIT(flow->risk, NDPI_BINARY_APPLICATION_TRANSFER);
NDPI_LOG_INFO(ndpi_struct, "found executable HTTP transfer");