summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-21 23:28:00 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2007-11-21 23:28:00 +0000
commitfcc35e8419c3dbf653c304886a827b52efdab402 (patch)
treeb41d779ce53936178795653376f1c76ad931ae03
parentab97d30ecb919fdc582b287f6ed195f56f8b940a (diff)
downloadnuttx-fcc35e8419c3dbf653c304886a827b52efdab402.tar.gz
nuttx-fcc35e8419c3dbf653c304886a827b52efdab402.tar.bz2
nuttx-fcc35e8419c3dbf653c304886a827b52efdab402.zip
Fix parsing of URL
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@393 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/netutils/webserver/httpd-fsdata.h7
-rw-r--r--nuttx/netutils/webserver/httpd.c4
2 files changed, 8 insertions, 3 deletions
diff --git a/nuttx/netutils/webserver/httpd-fsdata.h b/nuttx/netutils/webserver/httpd-fsdata.h
index a7ff24b6c..bc5a6659f 100644
--- a/nuttx/netutils/webserver/httpd-fsdata.h
+++ b/nuttx/netutils/webserver/httpd-fsdata.h
@@ -46,6 +46,10 @@
#include <sys/types.h>
#include <net/uip/uip.h>
+/****************************************************************************
+ * 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/nuttx/netutils/webserver/httpd.c b/nuttx/netutils/webserver/httpd.c
index 1f360c1ab..08ec2a295 100644
--- a/nuttx/netutils/webserver/httpd.c
+++ b/nuttx/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';
}