diff options
author | Luca Deri <lucaderi@users.noreply.github.com> | 2020-07-06 10:23:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 10:23:29 +0200 |
commit | b4edb758240e28da446d43c55fb0698ab66ded41 (patch) | |
tree | f49fc316e2a8d265a1eaaa9df717a414773f9b26 /src/lib/protocols/http.c | |
parent | dfb9e8ec1fd11d9dc5fbcd1906d8345724331b0e (diff) | |
parent | 4b8c8608d146c5407c6180a5698057c146e0d60b (diff) |
Merge pull request #950 from lnslbrty/improved/http-line-parsing
Improved HTTP line parsing if request splitted into multiple packets.
Diffstat (limited to 'src/lib/protocols/http.c')
-rw-r--r-- | src/lib/protocols/http.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/protocols/http.c b/src/lib/protocols/http.c index dd6d39c88..9ac26785c 100644 --- a/src/lib/protocols/http.c +++ b/src/lib/protocols/http.c @@ -805,6 +805,13 @@ static void ndpi_check_http_tcp(struct ndpi_detection_module_struct *ndpi_struct return; } + /* try to get some additional request header info even if the packet may not be HTTP */ + ndpi_parse_packet_line_info(ndpi_struct, flow); + if (packet->http_num_headers > 0) { + check_content_type_and_change_protocol(ndpi_struct, flow); + return; + } + NDPI_EXCLUDE_PROTO(ndpi_struct, flow); http_bitmask_exclude_other(flow); return; |