diff --git a/src/haload_init.c b/src/haload_init.c index f842fe053..08cf051a0 100644 --- a/src/haload_init.c +++ b/src/haload_init.c @@ -187,7 +187,7 @@ static struct hld_url_cfg *hld_alloc_url(char *url) struct hld_url_cfg *purl; struct hld_path *p = NULL; struct hbuf opts_buf = HBUF_NULL; - char quic_addr[128]; + char quic_addr[128], tmp_addr[16]; if (strncmp(url, "http://", 7) == 0) addr = url + 7; @@ -250,6 +250,11 @@ static struct hld_url_cfg *hld_alloc_url(char *url) } } + if (addr[0] == '0' && addr[1] == ':') { + snprintf(tmp_addr, sizeof(tmp_addr), "0.0.0.0:%s", addr + 2); + addr = tmp_addr; + } + if (!is_quic) { addr = strdup(addr); }