From 186ab03dd225949c9d17b2aced5b3b8ebf0aebde Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Tue, 6 Apr 2010 20:16:25 +0000 Subject: [PATCH] Search for last '.' just like in send_headers(). --- apps/webserver/httpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/webserver/httpd.c b/apps/webserver/httpd.c index aac4828f9..27412cc25 100644 --- a/apps/webserver/httpd.c +++ b/apps/webserver/httpd.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $Id: httpd.c,v 1.14 2010/04/06 20:10:45 oliverschmidt Exp $ + * $Id: httpd.c,v 1.15 2010/04/06 20:16:25 oliverschmidt Exp $ */ #include @@ -231,7 +231,7 @@ PT_THREAD(handle_output(struct httpd_state *s)) PT_WAIT_THREAD(&s->outputpt, send_headers(s, http_header_200)); - ptr = strchr(s->filename, ISO_period); + ptr = strrchr(s->filename, ISO_period); if(ptr != NULL && strncmp(ptr, http_shtml, 6) == 0) { PT_INIT(&s->scriptpt); PT_WAIT_THREAD(&s->outputpt, handle_script(s));