diff options
author | Nardi Ivan <nardi.ivan@gmail.com> | 2020-09-07 16:35:04 +0200 |
---|---|---|
committer | Nardi Ivan <nardi.ivan@gmail.com> | 2020-09-08 10:34:05 +0200 |
commit | a1014e88958035a44f78734860aee5db3f327dce (patch) | |
tree | fb6774db170fbc2d05913a3516799927624534c6 /example/ndpiReader.c | |
parent | 601928cc8ee1788098ea3dcdc4180b75b380bc84 (diff) |
http: create a common function to parse User Agent field
Prepare the code to handle UA information from flows other than HTTP
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 6017bab23..d128f11c6 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -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; |