lib: drop two interim macros in favor of native libcurl API calls

Drop `strcasecompare` and `strncasecompare` in favor of libcurl API
calls `curl_strequal` and `curl_strnequal` respectively.

Also drop unnecessary `strcase.h` includes. Include `curl/curl.h`
instead where it wasn't included before.

Closes #17772
This commit is contained in:
Viktor Szakats 2025-06-28 12:17:30 +02:00
parent d553f7e9f0
commit a3787f98ac
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
54 changed files with 223 additions and 260 deletions

View file

@ -26,8 +26,8 @@
#ifndef CURL_DISABLE_PROXY
#include <curl/curl.h> /* for curl_strnequal() */
#include "curlx/inet_pton.h"
#include "strcase.h"
#include "noproxy.h"
#include "curlx/strparse.h"
@ -205,12 +205,12 @@ bool Curl_check_noproxy(const char *name, const char *no_proxy)
*/
if(tokenlen == namelen)
/* case A, exact match */
match = strncasecompare(token, name, namelen);
match = curl_strnequal(token, name, namelen);
else if(tokenlen < namelen) {
/* case B, tailmatch domain */
match = (name[namelen - tokenlen - 1] == '.') &&
strncasecompare(token, name + (namelen - tokenlen),
tokenlen);
curl_strnequal(token, name + (namelen - tokenlen),
tokenlen);
}
/* case C passes through, not a match */
break;