From b1e1f07f642d0e9bd16353f258479cb9b34cdc06 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Sun, 9 Dec 2007 23:35:03 +0000 Subject: [PATCH] Yet another PETSCII<->ASCII issue solved - this time it caused failure to send the right content type. --- apps/webserver/httpd-cfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/webserver/httpd-cfs.c b/apps/webserver/httpd-cfs.c index 5e707c6cd..9f60c08c6 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.8 2007/12/01 21:27:48 oliverschmidt Exp $ + * $Id: httpd-cfs.c,v 1.9 2007/12/09 23:35:03 oliverschmidt Exp $ */ #include @@ -115,6 +115,7 @@ PT_THREAD(handle_output(struct httpd_state *s)) petsciiconv_topetscii(s->filename, sizeof(s->filename)); s->fd = cfs_open(s->filename, CFS_READ); + petsciiconv_toascii(s->filename, sizeof(s->filename)); if(s->fd < 0) { s->fd = cfs_open("404.html", CFS_READ); if(s->fd < 0) { @@ -159,7 +160,9 @@ PT_THREAD(handle_input(struct httpd_state *s)) strncpy(s->filename, &s->inputbuf[1], sizeof(s->filename)); } + petsciiconv_topetscii(s->filename, sizeof(s->filename)); webserver_log_file(&uip_conn->ripaddr, s->filename); + petsciiconv_toascii(s->filename, sizeof(s->filename)); s->state = STATE_OUTPUT; while(1) {