diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-10-15 21:43:48 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-10-15 21:43:48 +0000 |
commit | a579d6706436615845f57692921e0891fb6e3719 (patch) | |
tree | 936f3c7c41195e63bfd13c2f2b0151e1db1db397 /lib/netrc.c | |
parent | be760bed7e544136eaa175f0fe58251da1ff6e41 (diff) | |
download | curl-a579d6706436615845f57692921e0891fb6e3719.tar.gz |
- Pascal Terjan filed bug #2154627
(http://curl.haxx.se/bug/view.cgi?id=2154627) which pointed out that libcurl
uses strcasecmp() in multiple places where it causes failures when the
Turkish locale is used. This is because 'i' and 'I' isn't the same letter so
strcasecmp() on those letters are different in Turkish than in English (or
just about all other languages). I thus introduced a totally new internal
function in libcurl (called Curl_ascii_equal) for doing case insentive
comparisons for english-(ascii?) style strings that thus will make "file"
and "FILE" match even if the Turkish locale is selected.
Diffstat (limited to 'lib/netrc.c')
-rw-r--r-- | lib/netrc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/netrc.c b/lib/netrc.c index d7c7fd108..2f049e929 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -155,7 +155,7 @@ int Curl_parsenetrc(const char *host, switch(state) { case NOTHING: - if(strequal("machine", tok)) { + if(Curl_ascii_equal("machine", tok)) { /* the next tok is the machine name, this is in itself the delimiter that starts the stuff entered for this machine, after this we need to search for 'login' and @@ -164,7 +164,7 @@ int Curl_parsenetrc(const char *host, } break; case HOSTFOUND: - if(strequal(host, tok)) { + if(Curl_ascii_equal(host, tok)) { /* and yes, this is our host! */ state=HOSTVALID; #ifdef _NETRC_DEBUG @@ -180,7 +180,7 @@ int Curl_parsenetrc(const char *host, /* we are now parsing sub-keywords concerning "our" host */ if(state_login) { if(specific_login) { - state_our_login = strequal(login, tok); + state_our_login = Curl_ascii_equal(login, tok); } else { strncpy(login, tok, LOGINSIZE-1); @@ -199,11 +199,11 @@ int Curl_parsenetrc(const char *host, } state_password=0; } - else if(strequal("login", tok)) + else if(Curl_ascii_equal("login", tok)) state_login=1; - else if(strequal("password", tok)) + else if(Curl_ascii_equal("password", tok)) state_password=1; - else if(strequal("machine", tok)) { + else if(Curl_ascii_equal("machine", tok)) { /* ok, there's machine here go => */ state = HOSTFOUND; state_our_login = FALSE; |