Drop unneded null byte at end of httpd-fsdata files.
This commit is contained in:
parent
f721f646fa
commit
d01df43a0c
6 changed files with 57 additions and 42 deletions
|
@ -74,11 +74,12 @@ httpd_fs_open(const char *name, struct httpd_fs_file *file)
|
|||
httpd_memcpy(&fram,f,sizeof(fram));
|
||||
|
||||
/*Compare name passed in RAM with name in whatever flash the file is in */
|
||||
/*makefsdata adds an extra zero byte at the end of the file */
|
||||
/*makefsdata no longer adds an extra zero byte at the end of the file */
|
||||
if(httpd_fs_strcmp((char *)name, fram.name) == 0) {
|
||||
if (file) {
|
||||
file->data = fram.data;
|
||||
file->len = fram.len-1;
|
||||
// file->len = fram.len-1;
|
||||
file->len = fram.len;
|
||||
#if WEBSERVER_CONF_FILESTATS==2 //increment count in linked list field if it is in RAM
|
||||
f->count++;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*********Generated by contiki/tools/makefsdata on 2011-07-23*********/
|
||||
/*********Generated by contiki/tools/makefsdata on 2011-09-10*********/
|
||||
|
||||
|
||||
const char data_404_html[87] HTTPD_STRING_ATTR = {
|
||||
const char data_404_html[86] HTTPD_STRING_ATTR = {
|
||||
/* /404.html */
|
||||
0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x00,
|
||||
0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x3c, 0x62, 0x6f, 0x64,
|
||||
|
@ -11,9 +11,9 @@ const char data_404_html[87] HTTPD_STRING_ATTR = {
|
|||
0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22,
|
||||
0x2f, 0x22, 0x3e, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3c, 0x2f,
|
||||
0x61, 0x3e, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c,
|
||||
0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x00};
|
||||
0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e};
|
||||
|
||||
const char data_files_shtml[169] HTTPD_STRING_ATTR = {
|
||||
const char data_files_shtml[168] HTTPD_STRING_ATTR = {
|
||||
/* /files.shtml */
|
||||
0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x00,
|
||||
0x25, 0x21, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e,
|
||||
|
@ -31,9 +31,9 @@ const char data_files_shtml[169] HTTPD_STRING_ATTR = {
|
|||
0x69, 0x6c, 0x65, 0x2d, 0x73, 0x74, 0x61, 0x74, 0x73, 0x20,
|
||||
0x2a, 0x0a, 0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e,
|
||||
0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x3c, 0x2f, 0x68,
|
||||
0x74, 0x6d, 0x6c, 0x3e, 0x0a, 0x00};
|
||||
0x74, 0x6d, 0x6c, 0x3e, 0x0a};
|
||||
|
||||
const char data_index_shtml[121] HTTPD_STRING_ATTR = {
|
||||
const char data_index_shtml[120] HTTPD_STRING_ATTR = {
|
||||
/* /index.shtml */
|
||||
0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x00,
|
||||
0x25, 0x21, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x0a,
|
||||
|
@ -46,9 +46,9 @@ const char data_index_shtml[121] HTTPD_STRING_ATTR = {
|
|||
0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x20,
|
||||
0x77, 0x65, 0x62, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x21, 0x0a, 0x25, 0x21, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2d,
|
||||
0x73, 0x74, 0x61, 0x74, 0x73, 0x20, 0x2e, 0x00};
|
||||
0x73, 0x74, 0x61, 0x74, 0x73, 0x20, 0x2e};
|
||||
|
||||
const char data_status_shtml[159] HTTPD_STRING_ATTR = {
|
||||
const char data_status_shtml[158] HTTPD_STRING_ATTR = {
|
||||
/* /status.shtml */
|
||||
0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x00,
|
||||
0x25, 0x21, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x0a,
|
||||
|
@ -65,9 +65,9 @@ const char data_status_shtml[159] HTTPD_STRING_ATTR = {
|
|||
0x73, 0x3c, 0x2f, 0x68, 0x34, 0x3e, 0x0a, 0x25, 0x21, 0x20,
|
||||
0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0x0a, 0x25, 0x21,
|
||||
0x20, 0x66, 0x69, 0x6c, 0x65, 0x2d, 0x73, 0x74, 0x61, 0x74,
|
||||
0x73, 0x20, 0x2e, 0x0a, 0x00};
|
||||
0x73, 0x20, 0x2e, 0x0a};
|
||||
|
||||
const char data_tcp_shtml[228] HTTPD_STRING_ATTR = {
|
||||
const char data_tcp_shtml[227] HTTPD_STRING_ATTR = {
|
||||
/* /tcp.shtml */
|
||||
0x2f, 0x74, 0x63, 0x70, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x00,
|
||||
0x25, 0x21, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e,
|
||||
|
@ -91,7 +91,7 @@ const char data_tcp_shtml[228] HTTPD_STRING_ATTR = {
|
|||
0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x0a, 0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x3e,
|
||||
0x0a, 0x25, 0x21, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2d, 0x73,
|
||||
0x74, 0x61, 0x74, 0x73, 0x20, 0x2e, 0x00};
|
||||
0x74, 0x61, 0x74, 0x73, 0x20, 0x2e};
|
||||
|
||||
|
||||
/* Structure of linked list (all offsets relative to start of section):
|
||||
|
@ -113,4 +113,4 @@ const struct httpd_fsdata_file file_tcp_shtml[] HTTPD_STRING_ATTR ={{ fi
|
|||
|
||||
#define HTTPD_FS_ROOT file_tcp_shtml
|
||||
#define HTTPD_FS_NUMFILES 5
|
||||
#define HTTPD_FS_SIZE 764
|
||||
#define HTTPD_FS_SIZE 759
|
||||
|
|
|
@ -2,5 +2,15 @@ webserver_src = webserver-nogui.c httpd.c http-strings.c psock.c memb.c \
|
|||
httpd-fs.c httpd-cgi.c
|
||||
webserver_dsc = webserver-dsc.c
|
||||
|
||||
#Run makefsdata to regenerate httpd-fsdata.c when web content has been edited. This requires PERL.
|
||||
# Note: Deleting files or transferring pages from makefsdata.ignore will not trigger this rule
|
||||
# when there is no change in modification dates.
|
||||
$(CONTIKI)/apps/webserver/httpd-fsdata.c : $(CONTIKI)/apps/webserver/httpd-fs/*.*
|
||||
$(CONTIKI)/tools/makefsdata -d $(CONTIKI)/apps/webserver/httpd-fs -o $(CONTIKI)/apps/webserver/httpd-fsdata.c
|
||||
|
||||
#Rebuild httpd-fs.c when makefsdata has changed httpd-fsdata.c
|
||||
$(CONTIKI)/apps/webserver/httpd-fs.c: $(CONTIKI)/apps/webserver/httpd-fsdata.c
|
||||
touch $(CONTIKI)/apps/webserver/httpd-fs.c
|
||||
|
||||
#$(CONTIKI)/apps/webserver/http-strings.c: $(CONTIKI)/apps/webserver/http-strings
|
||||
# cd $(CONTIKI)/apps/webserver/; $(CONTIKI)/tools/makestrings $<
|
||||
|
|
|
@ -17,7 +17,7 @@ static const char data_processes_shtml[] = {
|
|||
0x68, 0x3e, 0x3c, 0x2f, 0x74, 0x72, 0x3e, 0xa, 0x25, 0x21,
|
||||
0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73,
|
||||
0xa, 0x25, 0x21, 0x3a, 0x20, 0x2f, 0x66, 0x6f, 0x6f, 0x74,
|
||||
0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0xa, 0};
|
||||
0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0xa};
|
||||
|
||||
static const char data_404_html[] = {
|
||||
/* /404.html */
|
||||
|
@ -37,8 +37,7 @@ static const char data_404_html[] = {
|
|||
0x61, 0x64, 0x2e, 0x3c, 0x2f, 0x68, 0x33, 0x3e, 0xa, 0x20,
|
||||
0x20, 0x20, 0x20, 0x3c, 0x2f, 0x63, 0x65, 0x6e, 0x74, 0x65,
|
||||
0x72, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x62, 0x6f, 0x64,
|
||||
0x79, 0x3e, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e,
|
||||
0};
|
||||
0x79, 0x3e, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e};
|
||||
|
||||
static const char data_files_shtml[] = {
|
||||
/* /files.shtml */
|
||||
|
@ -119,13 +118,13 @@ static const char data_files_shtml[] = {
|
|||
0x70, 0x6e, 0x67, 0xa, 0x3c, 0x2f, 0x74, 0x64, 0x3e, 0x3c,
|
||||
0x2f, 0x74, 0x72, 0x3e, 0x3c, 0x2f, 0x74, 0x61, 0x62, 0x6c,
|
||||
0x65, 0x3e, 0xa, 0x25, 0x21, 0x3a, 0x20, 0x2f, 0x66, 0x6f,
|
||||
0x6f, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0};
|
||||
0x6f, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c};
|
||||
|
||||
static const char data_footer_html[] = {
|
||||
/* /footer.html */
|
||||
0x2f, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
|
||||
0x20, 0x20, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xa,
|
||||
0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0};
|
||||
0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e};
|
||||
|
||||
static const char data_header_html[] = {
|
||||
/* /header.html */
|
||||
|
@ -204,8 +203,7 @@ static const char data_header_html[] = {
|
|||
0x69, 0x6b, 0x69, 0x2f, 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x69, 0x6b, 0x69, 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0xa, 0x20,
|
||||
0x20, 0x77, 0x65, 0x62, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65,
|
||||
0x72, 0x21, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0xa,
|
||||
0};
|
||||
0x72, 0x21, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0xa};
|
||||
|
||||
static const char data_index_html[] = {
|
||||
/* /index.html */
|
||||
|
@ -307,7 +305,7 @@ static const char data_index_html[] = {
|
|||
0x2e, 0xa, 0x9, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0xa,
|
||||
0xa, 0x9, 0x20, 0x20, 0xa, 0x9, 0x20, 0xa, 0x20, 0x20,
|
||||
0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xa, 0x3c, 0x2f,
|
||||
0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0};
|
||||
0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa};
|
||||
|
||||
static const char data_style_css[] = {
|
||||
/* /style.css */
|
||||
|
@ -567,8 +565,7 @@ static const char data_style_css[] = {
|
|||
0x3a, 0x20, 0x23, 0x66, 0x66, 0x66, 0x63, 0x62, 0x61, 0x3b,
|
||||
0xa, 0x20, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3a,
|
||||
0x20, 0x73, 0x6f, 0x6c, 0x69, 0x64, 0x20, 0x31, 0x70, 0x78,
|
||||
0x3b, 0xa, 0xa, 0x7d, 0x20, 0xa, 0xa, 0xa, 0xa, 0xa,
|
||||
0};
|
||||
0x3b, 0xa, 0xa, 0x7d, 0x20, 0xa, 0xa, 0xa, 0xa, 0xa};
|
||||
|
||||
static const char data_tcp_shtml[] = {
|
||||
/* /tcp.shtml */
|
||||
|
@ -593,8 +590,7 @@ static const char data_tcp_shtml[] = {
|
|||
0x2f, 0x74, 0x72, 0x3e, 0xa, 0x25, 0x21, 0x20, 0x74, 0x63,
|
||||
0x70, 0x2d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x73, 0xa, 0x25, 0x21, 0x3a, 0x20, 0x2f, 0x66,
|
||||
0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c,
|
||||
0};
|
||||
0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c};
|
||||
|
||||
const struct httpd_fsdata_file file_processes_shtml[] = {{NULL, data_processes_shtml, data_processes_shtml + 17, sizeof(data_processes_shtml) - 17}};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue