diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2021-01-18 12:17:31 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2021-01-23 15:25:04 +0100 |
commit | cddbcf02f55e443c394f28768a20d0a7458cdb98 (patch) | |
tree | 575cd50aacee3d234160683fc1f6ee12c7f3302c /crypto/http | |
parent | Add check of HTTP method to OSSL_HTTP_REQ_CTX_content() (diff) | |
download | openssl-cddbcf02f55e443c394f28768a20d0a7458cdb98.tar.xz openssl-cddbcf02f55e443c394f28768a20d0a7458cdb98.zip |
rename OSSL_HTTP_REQ_CTX_header to OSSL_HTTP_REQ_CTX_set_request_line
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13898)
Diffstat (limited to 'crypto/http')
-rw-r--r-- | crypto/http/http_client.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c index 731142b161..9cde88d2e6 100644 --- a/crypto/http/http_client.c +++ b/crypto/http/http_client.c @@ -138,11 +138,12 @@ void OSSL_HTTP_REQ_CTX_set_max_response_length(OSSL_HTTP_REQ_CTX *rctx, } /* - * Create HTTP header using given op and path (or "/" in case path is NULL). + * Create request line using |ctx| and |path| (or "/" in case |path| is NULL). * Server name (and port) must be given if and only if plain HTTP proxy is used. */ -int OSSL_HTTP_REQ_CTX_header(OSSL_HTTP_REQ_CTX *rctx, const char *server, - const char *port, const char *path) +int OSSL_HTTP_REQ_CTX_set_request_line(OSSL_HTTP_REQ_CTX *rctx, + const char *server, const char *port, + const char *path) { if (rctx == NULL) { ERR_raise(ERR_LIB_HTTP, ERR_R_PASSED_NULL_PARAMETER); @@ -309,8 +310,9 @@ OSSL_HTTP_REQ_CTX *HTTP_REQ_CTX_new(BIO *wbio, BIO *rbio, int use_http_proxy, == NULL) return NULL; - if (OSSL_HTTP_REQ_CTX_header(rctx, use_http_proxy ? server : NULL, - port, path) + if (OSSL_HTTP_REQ_CTX_set_request_line(rctx, + use_http_proxy ? server : NULL, port, + path) && OSSL_HTTP_REQ_CTX_add1_headers(rctx, headers, server) && (req_mem == NULL || OSSL_HTTP_REQ_CTX_content(rctx, content_type, req_mem))) |