aboutsummaryrefslogtreecommitdiff
path: root/lib/parsedate.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-10-15 21:43:48 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-10-15 21:43:48 +0000
commita579d6706436615845f57692921e0891fb6e3719 (patch)
tree936f3c7c41195e63bfd13c2f2b0151e1db1db397 /lib/parsedate.c
parentbe760bed7e544136eaa175f0fe58251da1ff6e41 (diff)
- 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/parsedate.c')
-rw-r--r--lib/parsedate.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/parsedate.c b/lib/parsedate.c
index fc6f9216f..11dc55e64 100644
--- a/lib/parsedate.c
+++ b/lib/parsedate.c
@@ -83,6 +83,7 @@
#endif
#include <curl/curl.h>
+#include "strequal.h"
#include "parsedate.h"
const char * const Curl_wkday[] =
@@ -163,7 +164,7 @@ static int checkday(const char *check, size_t len)
else
what = &Curl_wkday[0];
for(i=0; i<7; i++) {
- if(curl_strequal(check, what[0])) {
+ if(Curl_ascii_equal(check, what[0])) {
found=TRUE;
break;
}
@@ -180,7 +181,7 @@ static int checkmonth(const char *check)
what = &Curl_month[0];
for(i=0; i<12; i++) {
- if(curl_strequal(check, what[0])) {
+ if(Curl_ascii_equal(check, what[0])) {
found=TRUE;
break;
}
@@ -200,7 +201,7 @@ static int checktz(const char *check)
what = tz;
for(i=0; i< sizeof(tz)/sizeof(tz[0]); i++) {
- if(curl_strequal(check, what->name)) {
+ if(Curl_ascii_equal(check, what->name)) {
found=TRUE;
break;
}