Fix parsing of URL

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@393 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2007-11-21 23:28:00 +00:00
parent 295bf51f3f
commit b54499d254
2 changed files with 8 additions and 3 deletions

View File

@ -46,6 +46,10 @@
#include <sys/types.h> #include <sys/types.h>
#include <net/uip/uip.h> #include <net/uip/uip.h>
/****************************************************************************
* Public Types
****************************************************************************/
struct httpd_fsdata_file struct httpd_fsdata_file
{ {
const struct httpd_fsdata_file *next; const struct httpd_fsdata_file *next;
@ -59,7 +63,8 @@ struct httpd_fsdata_file
#endif /* HTTPD_FS_STATISTICS */ #endif /* HTTPD_FS_STATISTICS */
}; };
struct httpd_fsdata_file_noconst { struct httpd_fsdata_file_noconst
{
struct httpd_fsdata_file *next; struct httpd_fsdata_file *next;
char *name; char *name;
char *data; char *data;

View File

@ -432,10 +432,10 @@ static inline int httpd_cmd(struct httpd_state *pstate)
else else
{ {
for (i = 0; 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++) i++)
{ {
pstate->ht_filename[i] = pstate->ht_buffer[i+5]; pstate->ht_filename[i] = pstate->ht_buffer[i+4];
} }
pstate->ht_filename[i]='\0'; pstate->ht_filename[i]='\0';
} }