summaryrefslogtreecommitdiffstats
path: root/crypto/http
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/http')
-rw-r--r--crypto/http/http_client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c
index a4eefad315..9f41a31bf7 100644
--- a/crypto/http/http_client.c
+++ b/crypto/http/http_client.c
@@ -286,7 +286,7 @@ static int OSSL_HTTP_REQ_CTX_add1_headers(OSSL_HTTP_REQ_CTX *rctx,
const char *host)
{
int i;
- int add_host = 1;
+ int add_host = host != NULL && *host != '\0';
CONF_VALUE *hdr;
for (i = 0; i < sk_CONF_VALUE_num(headers); i++) {