diff options
author | Luca Deri <deri@ntop.org> | 2019-10-01 12:25:39 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2019-10-01 12:25:39 +0200 |
commit | e45237a93f771f3d4aeb6c2360469f09c0282b58 (patch) | |
tree | 59b012693a1a66cbb493b0830f8ba61169aaf9bc /example/reader_util.c | |
parent | a62cf102331653119b83e87d2efdef6d11cefcd1 (diff) |
Removed http:// from HTTP url
Reported URL in ndpiReader
Diffstat (limited to 'example/reader_util.c')
-rw-r--r-- | example/reader_util.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/example/reader_util.c b/example/reader_util.c index db25099a2..1cfedf1a6 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -976,7 +976,14 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl else if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UBNTAC2) { snprintf(flow->info, sizeof(flow->info), "%s", flow->ndpi_flow->protos.ubntac2.version); } - if(flow->detected_protocol.app_protocol != NDPI_PROTOCOL_DNS) { + /* HTTP */ + else if(flow->detected_protocol.master_protocol == NDPI_PROTOCOL_HTTP) { + if(flow->ndpi_flow->http.url != NULL) { + snprintf(flow->http.url, sizeof(flow->http.url), "%s", flow->ndpi_flow->http.url); + flow->http.response_status_code = flow->ndpi_flow->http.response_status_code; + } + } + else if(flow->detected_protocol.app_protocol != NDPI_PROTOCOL_DNS) { /* SSH */ if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_SSH) { snprintf(flow->ssh_tls.client_info, sizeof(flow->ssh_tls.client_info), "%s", |