http: add missing brackets around ip6 host header 93/42893/2
authorAdrian Villin <[email protected]>
Mon, 26 May 2025 15:03:21 +0000 (17:03 +0200)
committerFlorin Coras <[email protected]>
Mon, 26 May 2025 19:12:10 +0000 (19:12 +0000)
Type: fix

Change-Id: Ia4a175d30e20a3e1ceeee0290914b3cb51904071
Signed-off-by: Adrian Villin <[email protected]>
src/plugins/http/http.c

index 876b7d2..1aed2fd 100644 (file)
@@ -906,7 +906,7 @@ http_transport_connect (transport_endpoint_cfg_t *tep)
     hc->host = format (0, "%U:%d", format_ip4_address, &sep->ip.ip4,
                       clib_net_to_host_u16 (sep->port));
   else
-    hc->host = format (0, "%U:%d", format_ip6_address, &sep->ip.ip6,
+    hc->host = format (0, "[%U]:%d", format_ip6_address, &sep->ip.ip6,
                       clib_net_to_host_u16 (sep->port));
 
   HTTP_DBG (1, "hc ho_index %x", hc_index);