From 69b0727a6dea16a76394e046cce12df8016ab85f Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Tue, 6 Apr 2010 12:03:18 +0000 Subject: [PATCH] There are no query strings or alike in the CFS web server so the file extensions have to be the actual end of the requested filename. --- apps/webserver/httpd-cfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/webserver/httpd-cfs.c b/apps/webserver/httpd-cfs.c index 1695f0a2c..ece5c196e 100644 --- a/apps/webserver/httpd-cfs.c +++ b/apps/webserver/httpd-cfs.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $Id: httpd-cfs.c,v 1.16 2010/04/06 11:49:47 oliverschmidt Exp $ + * $Id: httpd-cfs.c,v 1.17 2010/04/06 12:03:18 oliverschmidt Exp $ */ #include @@ -108,13 +108,13 @@ PT_THREAD(send_headers(struct httpd_state *s, const char *statushdr)) ptr = strrchr(s->filename, ISO_period); if(ptr == NULL) { ptr = http_content_type_plain; - } else if(strncmp(http_html, ptr, 5) == 0) { + } else if(strcmp(http_html, ptr) == 0) { ptr = http_content_type_html; - } else if(strncmp(http_css, ptr, 4) == 0) { + } else if(strcmp(http_css, ptr) == 0) { ptr = http_content_type_css; - } else if(strncmp(http_png, ptr, 4) == 0) { + } else if(strcmp(http_png, ptr) == 0) { ptr = http_content_type_png; - } else if(strncmp(http_jpg, ptr, 4) == 0) { + } else if(strcmp(http_jpg, ptr) == 0) { ptr = http_content_type_jpg; } else { ptr = http_content_type_binary;