From 266383b44c4ebce5ddf551547e73ab6eec47805b Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Tue, 30 Nov 2021 20:06:09 +0100 Subject: OSSL_HTTP_set1_request(): Fix check for presence of port option and its documentation For HTTP (not HTTPS) with proxy, server must be given, port is optional Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/17186) --- crypto/http/http_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto') diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c index 45e92cd7fd..d8e54c03a9 100644 --- a/crypto/http/http_client.c +++ b/crypto/http/http_client.c @@ -961,7 +961,7 @@ int OSSL_HTTP_set1_request(OSSL_HTTP_REQ_CTX *rctx, const char *path, return 0; } use_http_proxy = rctx->proxy != NULL && !rctx->use_ssl; - if (use_http_proxy && (rctx->server == NULL || rctx->port == NULL)) { + if (use_http_proxy && rctx->server == NULL) { ERR_raise(ERR_LIB_HTTP, ERR_R_PASSED_INVALID_ARGUMENT); return 0; } -- cgit v1.2.3