http_client: fixing SSL error when specifying 443 port in the host header
@@ -530,7 +530,13 @@ static int add_host_and_content_length(struct flb_http_client *c)
out_port = c->port;
}
+ if (c->flags & FLB_IO_TLS && out_port == 443) {
+ tmp = flb_sds_copy(host, out_host, strlen(out_host));
+ }
+ else {
tmp = flb_sds_printf(&host, "%s:%i", out_host, out_port);
+ }
+
if (!tmp) {
flb_sds_destroy(host);
flb_error("[http_client] cannot compose temporary host header");
