提交 19a39b29 编写于 作者: D Dr. David von Oheimb 提交者: Dr. David von Oheimb

OSSL_HTTP_REQ_CTX_add1_headers(): Fix use with host == NULL (relative URLs)

Reviewed-by: NTomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15053)
上级 ca8f823f
......@@ -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++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册