From b54499d2543f21cfe2fa108dd2b1e94959c4e84c Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 21 Nov 2007 23:28:00 +0000 Subject: [PATCH] Fix parsing of URL git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@393 42af7a65-404d-4744-a932-0658087f49c3 --- netutils/webserver/httpd-fsdata.h | 7 ++++++- netutils/webserver/httpd.c | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/netutils/webserver/httpd-fsdata.h b/netutils/webserver/httpd-fsdata.h index a7ff24b6c6..bc5a6659f1 100644 --- a/netutils/webserver/httpd-fsdata.h +++ b/netutils/webserver/httpd-fsdata.h @@ -46,6 +46,10 @@ #include #include +/**************************************************************************** + * Public Types + ****************************************************************************/ + struct httpd_fsdata_file { const struct httpd_fsdata_file *next; @@ -59,7 +63,8 @@ struct httpd_fsdata_file #endif /* HTTPD_FS_STATISTICS */ }; -struct httpd_fsdata_file_noconst { +struct httpd_fsdata_file_noconst +{ struct httpd_fsdata_file *next; char *name; char *data; diff --git a/netutils/webserver/httpd.c b/netutils/webserver/httpd.c index 1f360c1abc..08ec2a2957 100644 --- a/netutils/webserver/httpd.c +++ b/netutils/webserver/httpd.c @@ -432,10 +432,10 @@ static inline int httpd_cmd(struct httpd_state *pstate) else { for (i = 0; - i < (HTTPD_MAX_FILENAME-1) && pstate->ht_buffer[i+5] != ISO_space; + i < (HTTPD_MAX_FILENAME-1) && pstate->ht_buffer[i+4] != ISO_space; i++) { - pstate->ht_filename[i] = pstate->ht_buffer[i+5]; + pstate->ht_filename[i] = pstate->ht_buffer[i+4]; } pstate->ht_filename[i]='\0'; }