diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2022-04-12 12:30:08 +0200 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2022-04-21 17:12:32 +0200 |
commit | 2c31d942af28a20e87979cbc76c3dd8d162c1a9c (patch) | |
tree | a7927f89d19ef4c9604eb80fbefc4fa1ac2d4734 /crypto/http | |
parent | a8e4ddc6d15b6e6b308428753bc22b12422adacf (diff) |
str[n]casecmp => OPENSSL_strncasecmp
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18103)
Diffstat (limited to 'crypto/http')
-rw-r--r-- | crypto/http/http_client.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c index 33e7b82b9e..8133a04936 100644 --- a/crypto/http/http_client.c +++ b/crypto/http/http_client.c @@ -322,7 +322,7 @@ static int add1_headers(OSSL_HTTP_REQ_CTX *rctx, for (i = 0; i < sk_CONF_VALUE_num(headers); i++) { hdr = sk_CONF_VALUE_value(headers, i); - if (add_host && strcasecmp("host", hdr->name) == 0) + if (add_host && OPENSSL_strcasecmp("host", hdr->name) == 0) add_host = 0; if (!OSSL_HTTP_REQ_CTX_add1_header(rctx, hdr->name, hdr->value)) return 0; @@ -666,13 +666,13 @@ int OSSL_HTTP_REQ_CTX_nbio(OSSL_HTTP_REQ_CTX *rctx) } if (value != NULL && line_end != NULL) { if (rctx->state == OHS_REDIRECT - && strcasecmp(key, "Location") == 0) { + && OPENSSL_strcasecmp(key, "Location") == 0) { rctx->redirection_url = value; return 0; } if (rctx->expected_ct != NULL - && strcasecmp(key, "Content-Type") == 0) { - if (strcasecmp(rctx->expected_ct, value) != 0) { + && OPENSSL_strcasecmp(key, "Content-Type") == 0) { + if (OPENSSL_strcasecmp(rctx->expected_ct, value) != 0) { ERR_raise_data(ERR_LIB_HTTP, HTTP_R_UNEXPECTED_CONTENT_TYPE, "expected=%s, actual=%s", rctx->expected_ct, value); @@ -682,12 +682,12 @@ int OSSL_HTTP_REQ_CTX_nbio(OSSL_HTTP_REQ_CTX *rctx) } /* https://tools.ietf.org/html/rfc7230#section-6.3 Persistence */ - if (strcasecmp(key, "Connection") == 0) { - if (strcasecmp(value, "keep-alive") == 0) + if (OPENSSL_strcasecmp(key, "Connection") == 0) { + if (OPENSSL_strcasecmp(value, "keep-alive") == 0) found_keep_alive = 1; - else if (strcasecmp(value, "close") == 0) + else if (OPENSSL_strcasecmp(value, "close") == 0) found_keep_alive = 0; - } else if (strcasecmp(key, "Content-Length") == 0) { + } else if (OPENSSL_strcasecmp(key, "Content-Length") == 0) { resp_len = (size_t)strtoul(value, &line_end, 10); if (line_end == value || *line_end != '\0') { ERR_raise_data(ERR_LIB_HTTP, |