From eb37f8f1fbf62fce7e8997a24408b998f895d07b Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Wed, 6 Jan 2021 18:28:24 +0100 Subject: Split HTTP request from response Content-Type. Request Content-Type should be present with POSTs and not with other methods such as GET --- example/ndpiReader.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'example/ndpiReader.c') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 9c882101b..3e69d2bad 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1376,6 +1376,9 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa fprintf(out, "[URL: %s][StatusCode: %u]", flow->http.url, flow->http.response_status_code); + if(flow->http.request_content_type[0] != '\0') + fprintf(out, "[Req Content-Type: %s]", flow->http.request_content_type); + if(flow->http.content_type[0] != '\0') fprintf(out, "[Content-Type: %s]", flow->http.content_type); } -- cgit v1.2.3