aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_main.c
diff options
context:
space:
mode:
authorMichele Campus <fci1908@gmail.com>2017-08-21 14:08:45 +0200
committerGitHub <noreply@github.com>2017-08-21 14:08:45 +0200
commita1367a9d395da68a5069d7e368843d35de0c19b6 (patch)
tree667e923a23fe2351386d2e3ba0a904feaa279d23 /src/lib/ndpi_main.c
parent5515c3a1091e4308467066c3cd58be59ff3d95d2 (diff)
parent7dc20134c05c719445ac4cf4ccae2cadbfa2ebf6 (diff)
Merge pull request #438 from pauloangelo/dev
HTTP respose status code after validation check.
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r--src/lib/ndpi_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 0cc02ac29..6ff836402 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -3817,6 +3817,11 @@ void ndpi_parse_packet_line_info(struct ndpi_detection_module_struct *ndpi_struc
packet->http_response.len = packet->line[0].len - NDPI_STATICSTRING_LEN("HTTP/1.1 ");
packet->http_num_headers++;
+ /* Set server HTTP response code */
+ strncpy((char*)flow->http.response_status_code, (char*)packet->http_response.ptr, 3);
+ flow->http.response_status_code[4]='\0';
+
+
NDPI_LOG(NDPI_PROTOCOL_UNKNOWN, ndpi_struct, NDPI_LOG_DEBUG,
"ndpi_parse_packet_line_info: HTTP response parsed: \"%.*s\"\n",
packet->http_response.len, packet->http_response.ptr);