summaryrefslogtreecommitdiff
path: root/dpi/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'dpi/file.c')
-rw-r--r--dpi/file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/dpi/file.c b/dpi/file.c
index 9e33cae2..5f1459ad 100644
--- a/dpi/file.c
+++ b/dpi/file.c
@@ -800,7 +800,7 @@ static char *File_normalize_path(const char *orig)
dReturn_val_if (orig == NULL, ret);
/* Make sure the string starts with "file:/" */
- if (strncmp(str, "file:/", 5) != 0)
+ if (dStrnAsciiCasecmp(str, "file:/", 5) != 0)
return ret;
str += 5;
@@ -942,7 +942,8 @@ static void File_serve_client(void *data, int f_write)
DPIBYE = 1;
MSG("(pid %d): Got DpiBye.\n", (int)getpid());
client->flags |= FILE_DONE;
- } else if (url && strcmp(url, "dpi:/file/toggle") == 0) {
+ } else if (url && dStrnAsciiCasecmp(url, "dpi:", 4) == 0 &&
+ strcmp(url+4, "/file/toggle") == 0) {
File_toggle_html_style(client);
} else if (path) {
File_get(client, path, url);