http: create a common function to parse User Agent field
Prepare the code to handle UA information from flows other than HTTP
This commit is contained in:
@@ -1268,11 +1268,11 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
|
||||
|
||||
if(flow->http.content_type[0] != '\0')
|
||||
fprintf(out, "[Content-Type: %s]", flow->http.content_type);
|
||||
|
||||
if(flow->http.user_agent[0] != '\0')
|
||||
fprintf(out, "[User-Agent: %s]", flow->http.user_agent);
|
||||
}
|
||||
|
||||
if(flow->http.user_agent[0] != '\0')
|
||||
fprintf(out, "[User-Agent: %s]", flow->http.user_agent);
|
||||
|
||||
if(flow->risk) {
|
||||
u_int i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user