summaryrefslogtreecommitdiffstats
path: root/crypto/http
diff options
context:
space:
mode:
authorDmitry Belyavskiy <beldmit@gmail.com>2022-04-12 12:30:08 +0200
committerDmitry Belyavskiy <beldmit@gmail.com>2022-04-22 11:34:41 +0200
commitfba140c73541c03e22b4fdb219a05d129bf0406d (patch)
treeb5c692f73ff063c2f071ef2383979fb8aa572164 /crypto/http
parent4b2bd2722b8294a6b27c9e1fcf7d76f7d9de9b44 (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/18069)
Diffstat (limited to 'crypto/http')
-rw-r--r--crypto/http/http_client.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/http/http_client.c b/crypto/http/http_client.c
index d6345b4582..8fcc9c3445 100644
--- a/crypto/http/http_client.c
+++ b/crypto/http/http_client.c
@@ -321,7 +321,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;
@@ -665,13 +665,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);
@@ -681,12 +681,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,