mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:33:31 +03:00
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:
parent
d553f7e9f0
commit
a3787f98ac
54 changed files with 223 additions and 260 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue