aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2023-09-20 11:17:09 +0200
committerLuca Deri <deri@ntop.org>2023-09-20 11:17:09 +0200
commit725fcf4852f06e2f54469c2439d13169d5d68d09 (patch)
tree1c9f34ee0cf7003fd17caa220927c4f213c831b5
parentd4e0b79dd60b8a5ef214f3a55291eb05594e7d71 (diff)
Renamed HTTP/2 to HTTP2 as the '/' can have side effects with applications sitting on top of nDPI
-rw-r--r--src/lib/ndpi_main.c2
-rw-r--r--src/lib/protocols/http2.c2
-rw-r--r--tests/cfgs/default/result/http2.pcapng.out4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 9f0b946a6..7a50731d6 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -2147,7 +2147,7 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_HTTP2,
- "HTTP/2", NDPI_PROTOCOL_CATEGORY_WEB,
+ "HTTP2", NDPI_PROTOCOL_CATEGORY_WEB,
ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */,
ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */);
diff --git a/src/lib/protocols/http2.c b/src/lib/protocols/http2.c
index 085d10aae..cca341965 100644
--- a/src/lib/protocols/http2.c
+++ b/src/lib/protocols/http2.c
@@ -57,7 +57,7 @@ void ndpi_search_http2(struct ndpi_detection_module_struct *ndpi_struct,
void init_http2_dissector(struct ndpi_detection_module_struct *ndpi_struct,
u_int32_t *id)
{
- ndpi_set_bitmask_protocol_detection("HTTP/2", ndpi_struct, *id,
+ ndpi_set_bitmask_protocol_detection("HTTP2", ndpi_struct, *id,
NDPI_PROTOCOL_HTTP2,
ndpi_search_http2,
NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
diff --git a/tests/cfgs/default/result/http2.pcapng.out b/tests/cfgs/default/result/http2.pcapng.out
index 672bbd293..ed7f88989 100644
--- a/tests/cfgs/default/result/http2.pcapng.out
+++ b/tests/cfgs/default/result/http2.pcapng.out
@@ -20,6 +20,6 @@ Patricia risk mask: 2/0 (search/found)
Patricia risk: 0/0 (search/found)
Patricia protocols: 2/0 (search/found)
-HTTP/2 10 1271 1
+HTTP2 10 1271 1
- 1 TCP 127.0.0.1:37824 <-> 127.0.0.1:29518 [proto: 349/HTTP/2][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 1][cat: Web/5][4 pkts/591 bytes <-> 6 pkts/680 bytes][Goodput ratio: 54/40][0.00 sec][bytes ratio: -0.070 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 1/0 0/0 1/1 0/0][Pkt Len c2s/s2c min/avg/max/stddev: 77/81 148/113 212/163 50/35][PLAIN TEXT ( HTTP/2.0)][Plen Bins: 40,10,30,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
+ 1 TCP 127.0.0.1:37824 <-> 127.0.0.1:29518 [proto: 349/HTTP2][IP: 0/Unknown][ClearText][Confidence: DPI][DPI packets: 1][cat: Web/5][4 pkts/591 bytes <-> 6 pkts/680 bytes][Goodput ratio: 54/40][0.00 sec][bytes ratio: -0.070 (Mixed)][IAT c2s/s2c min/avg/max/stddev: 1/0 0/0 1/1 0/0][Pkt Len c2s/s2c min/avg/max/stddev: 77/81 148/113 212/163 50/35][PLAIN TEXT ( HTTP/2.0)][Plen Bins: 40,10,30,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]