minor fix for http
This commit is contained in:
@@ -203,7 +203,7 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
|||||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PPSTREAM);
|
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_PPSTREAM);
|
||||||
}
|
}
|
||||||
else if(iqiyi_counter > 0) {
|
else if(iqiyi_counter > 0) {
|
||||||
NDPI_LOG(NDPI_SERVICE_IQIYI, ndpi_struct, NDPI_LOG_DEBUG, "iQiyi found.\n");
|
NDPI_LOG(NDPI_PROTOCOL_IQIYI, ndpi_struct, NDPI_LOG_DEBUG, "iQiyi found.\n");
|
||||||
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_IQIYI);
|
ndpi_int_http_add_connection(ndpi_struct, flow, NDPI_PROTOCOL_IQIYI);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -379,13 +379,6 @@ static void check_content_type_and_change_protocol(struct ndpi_detection_module_
|
|||||||
flow->guessed_host_protocol_id = flow->detected_protocol_stack[0];
|
flow->guessed_host_protocol_id = flow->detected_protocol_stack[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if((flow->detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN) */
|
|
||||||
/* && ((ndpi_struct->http_dont_dissect_response) || flow->http_detected)) */
|
|
||||||
/* ndpi_match_host_subprotocol(ndpi_struct, flow, */
|
|
||||||
/* (char *)flow->host_server_name, */
|
|
||||||
/* strlen((const char *)flow->host_server_name), */
|
|
||||||
/* NDPI_PROTOCOL_HTTP); */
|
|
||||||
|
|
||||||
if((flow->detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN)
|
if((flow->detected_protocol_stack[0] == NDPI_PROTOCOL_UNKNOWN)
|
||||||
&& ((ndpi_struct->http_dont_dissect_response) || flow->http_detected)
|
&& ((ndpi_struct->http_dont_dissect_response) || flow->http_detected)
|
||||||
&& (packet->http_origin.len > 0))
|
&& (packet->http_origin.len > 0))
|
||||||
@@ -545,9 +538,6 @@ void _org_ndpi_search_http_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
|||||||
{
|
{
|
||||||
struct ndpi_packet_struct *packet = &flow->packet;
|
struct ndpi_packet_struct *packet = &flow->packet;
|
||||||
|
|
||||||
// struct ndpi_id_struct *src=ndpi_struct->src;
|
|
||||||
// struct ndpi_id_struct *dst=ndpi_struct->dst;
|
|
||||||
|
|
||||||
u_int16_t filename_start;
|
u_int16_t filename_start;
|
||||||
|
|
||||||
NDPI_LOG(NDPI_PROTOCOL_HTTP, ndpi_struct, NDPI_LOG_DEBUG, "search http\n");
|
NDPI_LOG(NDPI_PROTOCOL_HTTP, ndpi_struct, NDPI_LOG_DEBUG, "search http\n");
|
||||||
@@ -902,6 +892,7 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
|||||||
"HTTP START Found, we will look for sub-protocols (content and host)...\n");
|
"HTTP START Found, we will look for sub-protocols (content and host)...\n");
|
||||||
|
|
||||||
if(packet->host_line.ptr != NULL) {
|
if(packet->host_line.ptr != NULL) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
nDPI is pretty scrupulous about HTTP so it waits until the
|
nDPI is pretty scrupulous about HTTP so it waits until the
|
||||||
HTTP response is received just to check that it conforms
|
HTTP response is received just to check that it conforms
|
||||||
@@ -933,7 +924,8 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
At first check, if this is for sure a response packet (in another direction. If not, if http is detected do nothing now and return,
|
At first check, if this is for sure a response packet (in another direction. If not, if http is detected do nothing now and return,
|
||||||
otherwise check the second packet for the http request . */
|
otherwise check the second packet for the http request
|
||||||
|
*/
|
||||||
if((flow->l4.tcp.http_stage - packet->packet_direction) == 1) {
|
if((flow->l4.tcp.http_stage - packet->packet_direction) == 1) {
|
||||||
|
|
||||||
if(flow->http_detected)
|
if(flow->http_detected)
|
||||||
|
|||||||
Reference in New Issue
Block a user