aboutsummaryrefslogtreecommitdiff
path: root/lib/dict.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-09-30 18:54:02 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-10-31 08:46:35 +0100
commit811a693b803a8715e15ba56fb161d9e6b3b6b016 (patch)
tree47f61478d7d860eadba5396d88a444e906f6cfb9 /lib/dict.c
parent502acba2af821391b85a2cd4ac7b91ad8e9d4180 (diff)
strcasecompare: all case insensitive string compares ignore locale now
We had some confusions on when each function was used. We should not act differently on different locales anyway.
Diffstat (limited to 'lib/dict.c')
-rw-r--r--lib/dict.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/dict.c b/lib/dict.c
index 9dd76e738..69defc4cc 100644
--- a/lib/dict.c
+++ b/lib/dict.c
@@ -55,7 +55,7 @@
#include "escape.h"
#include "progress.h"
#include "dict.h"
-#include "rawstr.h"
+#include "strcase.h"
#include "curl_memory.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -144,9 +144,9 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
/* AUTH is missing */
}
- if(Curl_raw_nequal(path, DICT_MATCH, sizeof(DICT_MATCH)-1) ||
- Curl_raw_nequal(path, DICT_MATCH2, sizeof(DICT_MATCH2)-1) ||
- Curl_raw_nequal(path, DICT_MATCH3, sizeof(DICT_MATCH3)-1)) {
+ if(strncasecompare(path, DICT_MATCH, sizeof(DICT_MATCH)-1) ||
+ strncasecompare(path, DICT_MATCH2, sizeof(DICT_MATCH2)-1) ||
+ strncasecompare(path, DICT_MATCH3, sizeof(DICT_MATCH3)-1)) {
word = strchr(path, ':');
if(word) {
@@ -202,9 +202,9 @@ static CURLcode dict_do(struct connectdata *conn, bool *done)
Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
-1, NULL); /* no upload */
}
- else if(Curl_raw_nequal(path, DICT_DEFINE, sizeof(DICT_DEFINE)-1) ||
- Curl_raw_nequal(path, DICT_DEFINE2, sizeof(DICT_DEFINE2)-1) ||
- Curl_raw_nequal(path, DICT_DEFINE3, sizeof(DICT_DEFINE3)-1)) {
+ else if(strncasecompare(path, DICT_DEFINE, sizeof(DICT_DEFINE)-1) ||
+ strncasecompare(path, DICT_DEFINE2, sizeof(DICT_DEFINE2)-1) ||
+ strncasecompare(path, DICT_DEFINE3, sizeof(DICT_DEFINE3)-1)) {
word = strchr(path, ':');
if(word) {