summaryrefslogtreecommitdiff
path: root/dpi/ftp.c
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2011-11-11 04:26:41 +0000
committercorvid <corvid@lavabit.com>2011-11-11 04:26:41 +0000
commit980fe05f47b9d6dd8626b5ea021e2c16807ff5ca (patch)
tree2e5670d74d8fcfb8e7f6b84ffaf5f77b74855746 /dpi/ftp.c
parent119aa95ed6bc612dd4ef7a3121d9bf220148aaa4 (diff)
locale-independent ASCII character case handling
Basically, I and i are different letters in Turkic languages, and this causes problems for str(n)casecmp and toupper/tolower in these locales when dillo is dealing with ASCII.
Diffstat (limited to 'dpi/ftp.c')
-rw-r--r--dpi/ftp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/dpi/ftp.c b/dpi/ftp.c
index 3ddac10c..460c2f03 100644
--- a/dpi/ftp.c
+++ b/dpi/ftp.c
@@ -98,12 +98,12 @@ static int a_Misc_get_content_type_from_data2(void *Data, size_t Size,
/* HTML try */
for (i = 0; i < Size && dIsspace(p[i]); ++i);
- if ((Size - i >= 5 && !dStrncasecmp(p+i, "<html", 5)) ||
- (Size - i >= 5 && !dStrncasecmp(p+i, "<head", 5)) ||
- (Size - i >= 6 && !dStrncasecmp(p+i, "<title", 6)) ||
- (Size - i >= 14 && !dStrncasecmp(p+i, "<!doctype html", 14)) ||
+ if ((Size - i >= 5 && !dStrnAsciiCasecmp(p+i, "<html", 5)) ||
+ (Size - i >= 5 && !dStrnAsciiCasecmp(p+i, "<head", 5)) ||
+ (Size - i >= 6 && !dStrnAsciiCasecmp(p+i, "<title", 6)) ||
+ (Size - i >= 14 && !dStrnAsciiCasecmp(p+i, "<!doctype html", 14)) ||
/* this line is workaround for FTP through the Squid proxy */
- (Size - i >= 17 && !dStrncasecmp(p+i, "<!-- HTML listing", 17))) {
+ (Size - i >= 17 && !dStrnAsciiCasecmp(p+i, "<!-- HTML listing", 17))) {
Type = 1;
st = 0;