diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-05-01 19:26:53 +0200 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-05-14 19:24:42 +0200 |
commit | 19a39b29e846e465ee97e7519acf14ddc9302198 (patch) | |
tree | d53a725d3f30c5e5049374afa09c7e55c20980f6 /crypto | |
parent | ca8f823ffd955493b5f7ce85b7511b758f2a982e (diff) |
OSSL_HTTP_REQ_CTX_add1_headers(): Fix use with host == NULL (relative URLs)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15053)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/http/http_client.c | 2 |
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++) { |