diff options
author | Paulo Angelo <pa@pauloangelo.com> | 2017-08-19 14:19:30 -0300 |
---|---|---|
committer | Paulo Angelo <pa@pauloangelo.com> | 2017-08-19 14:19:30 -0300 |
commit | 63c97753a102e58e60ecdf09088525ea8b35ceaa (patch) | |
tree | eb82478fe5d766d78c92fcf4f7720a18fded72dc /src/lib/ndpi_main.c | |
parent | 449e06df77cd2dec2b942ce81c326733458419f7 (diff) |
Respose status code after validation check.
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 7d1e62df4..69313a88e 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); |