aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorLuca <deri@ntop.org>2019-10-31 00:14:20 +0100
committerLuca <deri@ntop.org>2019-10-31 00:14:20 +0100
commit4802987178a0a49ea5ff4a01e92a35b5517734dc (patch)
tree90577a9664c56338c4f71b1ec303bc1d2b39c1d2 /example/reader_util.c
parentaf01e61c89a66630fdc76e5059c0a348226e6f40 (diff)
Initial work towards HTTP content-type export
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index 3d9fde695..44e02616e 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -980,6 +980,8 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
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;
+ snprintf(flow->http.content_type, sizeof(flow->http.content_type), "%s", flow->ndpi_flow->http.content_type ? flow->ndpi_flow->http.content_type : "");
+ snprintf(flow->http.user_agent, sizeof(flow->http.user_agent), "%s", flow->ndpi_flow->http.user_agent ? flow->ndpi_flow->http.user_agent : "");
}
} else if(is_ndpi_proto(flow, NDPI_PROTOCOL_TELNET)) {
snprintf(flow->telnet.username, sizeof(flow->telnet.username), "%s", flow->ndpi_flow->protos.telnet.username);