diff --git a/apps/webserver/httpd-cgi.c b/apps/webserver/httpd-cgi.c
index 915f3e695..fdf4ccd18 100644
--- a/apps/webserver/httpd-cgi.c
+++ b/apps/webserver/httpd-cgi.c
@@ -28,7 +28,7 @@
*
* This file is part of the uIP TCP/IP stack.
*
- * $Id: httpd-cgi.c,v 1.13 2008/10/14 09:40:11 julienabeille Exp $
+ * $Id: httpd-cgi.c,v 1.14 2008/10/14 11:07:57 adamdunkels Exp $
*
*/
@@ -40,7 +40,7 @@
* non-zero value indicates that the function has completed and that
* the web server should move along to the next script line.
*
- */
+ */
#include
#include
@@ -51,8 +51,6 @@
#include "httpd-fs.h"
#include "lib/petsciiconv.h"
-
-#include "sensors.h"
static struct httpd_cgi_call *calls = NULL;
@@ -98,11 +96,7 @@ static const char tcp_name[] = /* "tcp-connections"*/
0x73, 0};
static const char proc_name[] = /* "processes"*/
{0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
- 0x65, 0x73, 0};
-
-static const char sensor_name[] = "sensors";
-
-char sensor_temperature[12];
+ 0x65, 0x73, 0};
static const char *states[] = {
closed,
@@ -116,16 +110,7 @@ static const char *states[] = {
last_ack,
none,
running,
- called};
-
- uint8_t sprint_ip6(uip_ip6addr_t addr, char * result);
-
-
-void
-web_set_temp(char *s)
-{
- strcpy(sensor_temperature, s);
-}
+ called};
/*---------------------------------------------------------------------------*/
static
@@ -171,26 +156,21 @@ make_tcp_stats(void *arg)
{
struct uip_conn *conn;
struct httpd_state *s = (struct httpd_state *)arg;
-
- uint16_t numprinted;
-
- conn = &uip_conns[s->u.count];
-
- numprinted = snprintf((char *)uip_appdata, uip_mss(),
- "%d | ",
- htons(conn->lport));
-
- numprinted += sprint_ip6(conn->ripaddr, uip_appdata + numprinted);
- numprinted += snprintf((char *)uip_appdata + numprinted, uip_mss() - numprinted,
- "-%u | %s | %u | %u | %c %c |
\r\n",
- htons(conn->rport),
- states[conn->tcpstateflags & UIP_TS_MASK],
- conn->nrtx,
- conn->timer,
- (uip_outstanding(conn))? '*':' ',
- (uip_stopped(conn))? '!':' ');
-
- return numprinted;
+
+ conn = &uip_conns[s->u.count];
+ return snprintf((char *)uip_appdata, uip_mss(),
+ "%d | %u.%u.%u.%u:%u | %s | %u | %u | %c %c |
\r\n",
+ htons(conn->lport),
+ conn->ripaddr.u8[0],
+ conn->ripaddr.u8[1],
+ conn->ripaddr.u8[2],
+ conn->ripaddr.u8[3],
+ htons(conn->rport),
+ states[conn->tcpstateflags & UIP_TS_MASK],
+ conn->nrtx,
+ conn->timer,
+ (uip_outstanding(conn))? '*':' ',
+ (uip_stopped(conn))? '!':' ');
}
/*---------------------------------------------------------------------------*/
static
@@ -230,22 +210,6 @@ PT_THREAD(processes(struct httpd_state *s, char *ptr))
for(s->u.ptr = PROCESS_LIST(); s->u.ptr != NULL; s->u.ptr = ((struct process *)s->u.ptr)->next) {
PSOCK_GENERATOR_SEND(&s->sout, make_processes, s->u.ptr);
}
- PSOCK_END(&s->sout);
-}
-/*---------------------------------------------------------------------------*/
-static unsigned short
-generate_sensor_readings(void *arg)
-{
- return snprintf((char *)uip_appdata, uip_mss(), "Temperature: %s\n", sensor_temperature);
-}
-/*---------------------------------------------------------------------------*/
-static
-PT_THREAD(sensor_readings(struct httpd_state *s, char *ptr))
-{
- PSOCK_BEGIN(&s->sout);
-
- PSOCK_GENERATOR_SEND(&s->sout, generate_sensor_readings, s);
-
PSOCK_END(&s->sout);
}
/*---------------------------------------------------------------------------*/
@@ -266,65 +230,13 @@ httpd_cgi_add(struct httpd_cgi_call *c)
HTTPD_CGI_CALL(file, file_name, file_stats);
HTTPD_CGI_CALL(tcp, tcp_name, tcp_stats);
-HTTPD_CGI_CALL(proc, proc_name, processes);
-HTTPD_CGI_CALL(sensors, sensor_name, sensor_readings);
+HTTPD_CGI_CALL(proc, proc_name, processes);
void
httpd_cgi_init(void)
{
httpd_cgi_add(&file);
httpd_cgi_add(&tcp);
- httpd_cgi_add(&proc);
- httpd_cgi_add(&sensors);
+ httpd_cgi_add(&proc);
}
/*---------------------------------------------------------------------------*/
-
-
-
-uint8_t sprint_ip6(uip_ip6addr_t addr, char * result)
- {
- unsigned char zerocnt = 0;
- unsigned char numprinted = 0;
- char * starting = result;
-
- unsigned char i = 0;
-
- while (numprinted < 8)
- {
- //Address is zero, have we used our ability to
- //replace a bunch with : yet?
- if ((addr.u16[i] == 0) && (zerocnt == 0))
- {
- //How mant zeros?
- zerocnt = 0;
- while(addr.u16[zerocnt + i] == 0)
- zerocnt++;
-
- //just one, don't waste our zeros...
- if (zerocnt == 1)
- {
- *result++ = '0';
- numprinted++;
- break;
- }
-
- //Cool - can replace a bunch of zeros
- i += zerocnt;
- numprinted += zerocnt;
- }
- //Normal address, just print it
- else
- {
- result += sprintf(result, "%x", (unsigned int)(ntohs(addr.u16[i])));
- i++;
- numprinted++;
- }
-
- //Don't print : on last one
- if (numprinted != 8)
- *result++ = ':';
- }
-
- return (result - starting);
- }
-
diff --git a/apps/webserver/httpd-cgi.h b/apps/webserver/httpd-cgi.h
index ce09d057e..f6cae6291 100644
--- a/apps/webserver/httpd-cgi.h
+++ b/apps/webserver/httpd-cgi.h
@@ -28,7 +28,7 @@
*
* This file is part of the uIP TCP/IP stack.
*
- * $Id: httpd-cgi.h,v 1.2 2008/10/14 09:40:11 julienabeille Exp $
+ * $Id: httpd-cgi.h,v 1.3 2008/10/14 11:07:57 adamdunkels Exp $
*
*/
@@ -54,6 +54,4 @@ void httpd_cgi_add(struct httpd_cgi_call *c);
static struct httpd_cgi_call name = {NULL, str, function}
void httpd_cgi_init(void);
-void web_set_temp(char *s);
-
#endif /* __HTTPD_CGI_H__ */
diff --git a/apps/webserver/httpd-fs.c b/apps/webserver/httpd-fs.c
index 96f0d6319..e0909f633 100644
--- a/apps/webserver/httpd-fs.c
+++ b/apps/webserver/httpd-fs.c
@@ -30,7 +30,7 @@
*
* Author: Adam Dunkels
*
- * $Id: httpd-fs.c,v 1.4 2008/10/14 09:40:11 julienabeille Exp $
+ * $Id: httpd-fs.c,v 1.5 2008/10/14 11:07:57 adamdunkels Exp $
*/
#include "contiki-net.h"
@@ -38,7 +38,7 @@
#include "httpd-fs.h"
#include "httpd-fsdata.h"
-#include "httpd-fsdata.c"
+#include "httpd-fsdata.c"
#if HTTPD_FS_STATISTICS
static u16_t count[HTTPD_FS_NUMFILES];
@@ -52,14 +52,14 @@ httpd_fs_strcmp(const char *str1, const char *str2)
i = 0;
loop:
- if( pgm_read_byte(str2 + i) == 0 ||
+ if(str2[i] == 0 ||
str1[i] == '\r' ||
str1[i] == '\n') {
return 0;
}
- if(str1[i] != pgm_read_byte(str2 + i)) {
- return 1;
+ if(str1[i] != str2[i]) {
+ return 1;
}
++i;
diff --git a/apps/webserver/httpd-fs.h b/apps/webserver/httpd-fs.h
index 2421ef972..9abed703c 100644
--- a/apps/webserver/httpd-fs.h
+++ b/apps/webserver/httpd-fs.h
@@ -30,7 +30,7 @@
*
* Author: Adam Dunkels
*
- * $Id: httpd-fs.h,v 1.2 2008/10/14 09:40:11 julienabeille Exp $
+ * $Id: httpd-fs.h,v 1.3 2008/10/14 11:07:57 adamdunkels Exp $
*/
#ifndef __HTTPD_FS_H__
#define __HTTPD_FS_H__
@@ -39,8 +39,6 @@
#define HTTPD_FS_STATISTICS 1
-#include
-
struct httpd_fs_file {
char *data;
int len;
@@ -58,8 +56,4 @@ u16_t httpd_fs_count(char *name);
void httpd_fs_init(void);
-#define httpd_fs_cpy memcpy_P
-#define httpd_fs_strchr strchr_P
-#define httpd_fs_getchar(x) pgm_read_byte(x)
-
#endif /* __HTTPD_FS_H__ */
diff --git a/apps/webserver/httpd-fs/header.html b/apps/webserver/httpd-fs/header.html
index ed782924e..65d967cb8 100644
--- a/apps/webserver/httpd-fs/header.html
+++ b/apps/webserver/httpd-fs/header.html
@@ -16,7 +16,6 @@
File statistics
Network connections
System processes
- Sensor Readings
diff --git a/apps/webserver/httpd-fs/index.html b/apps/webserver/httpd-fs/index.html
index 5386ec193..6d3be9b7d 100644
--- a/apps/webserver/httpd-fs/index.html
+++ b/apps/webserver/httpd-fs/index.html
@@ -16,7 +16,6 @@
File statistics
Network connections
System processes
- Sensor Readings
diff --git a/apps/webserver/httpd-fsdata.c b/apps/webserver/httpd-fsdata.c
index 2c1dae14a..02596adf1 100644
--- a/apps/webserver/httpd-fsdata.c
+++ b/apps/webserver/httpd-fsdata.c
@@ -1,4 +1,4 @@
-static const char data_processes_shtml[] PROGMEM = {
+static const char data_processes_shtml[] = {
/* /processes.shtml */
0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
0x25, 0x21, 0x3a, 0x20, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65,
@@ -19,91 +19,28 @@ static const char data_processes_shtml[] PROGMEM = {
0xa, 0x25, 0x21, 0x3a, 0x20, 0x2f, 0x66, 0x6f, 0x6f, 0x74,
0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0xa, 0};
-static const char data_header_html[] PROGMEM = {
- /* /header.html */
- 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
- 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20,
- 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49,
- 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f,
- 0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20,
- 0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73,
- 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45,
- 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
- 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72,
- 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34,
- 0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64,
- 0x22, 0x3e, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa,
- 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x20,
- 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e,
- 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x6f,
- 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x69,
- 0x6b, 0x69, 0x2d, 0x64, 0x65, 0x6d, 0x6f, 0x20, 0x73, 0x65,
- 0x72, 0x76, 0x65, 0x72, 0x21, 0x3c, 0x2f, 0x74, 0x69, 0x74,
- 0x6c, 0x65, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c,
- 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x73,
- 0x74, 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22,
- 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78,
- 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x20, 0x68, 0x72, 0x65,
- 0x66, 0x3d, 0x22, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e,
- 0x63, 0x73, 0x73, 0x22, 0x3e, 0x20, 0x20, 0xa, 0x20, 0x20,
- 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x20, 0x20,
- 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f,
- 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x66, 0x66, 0x66, 0x65,
- 0x65, 0x63, 0x22, 0x20, 0x74, 0x65, 0x78, 0x74, 0x3d, 0x22,
- 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x22, 0x3e, 0xa, 0xa, 0x20,
- 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73,
- 0x73, 0x3d, 0x22, 0x6d, 0x65, 0x6e, 0x75, 0x62, 0x6c, 0x6f,
- 0x63, 0x6b, 0x22, 0x3e, 0xa, 0xa, 0x20, 0x20, 0x3c, 0x64,
- 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22,
- 0x6d, 0x65, 0x6e, 0x75, 0x22, 0x3e, 0xa, 0x20, 0x20, 0x3c,
- 0x70, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x62,
- 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, 0x74, 0x69, 0x74, 0x6c,
- 0x65, 0x22, 0x3e, 0x4d, 0x65, 0x6e, 0x75, 0x3c, 0x2f, 0x70,
- 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x70, 0x20, 0x63, 0x6c, 0x61,
- 0x73, 0x73, 0x3d, 0x22, 0x6d, 0x65, 0x6e, 0x75, 0x22, 0x3e,
- 0xa, 0x20, 0x20, 0xa, 0x20, 0x20, 0x3c, 0x61, 0x20, 0x68,
- 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x22, 0x3e, 0x46, 0x72,
- 0x6f, 0x6e, 0x74, 0x20, 0x70, 0x61, 0x67, 0x65, 0x3c, 0x2f,
- 0x61, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x20, 0x20, 0x3c,
- 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x66, 0x69,
- 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22,
- 0x3e, 0x46, 0x69, 0x6c, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74,
- 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x3c, 0x2f, 0x61, 0x3e,
- 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x61, 0x20,
- 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x74, 0x63, 0x70, 0x2e,
- 0x73, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x4e, 0x65, 0x74,
- 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
- 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x61, 0x3e,
- 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x61, 0x20,
- 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x70, 0x72, 0x6f, 0x63,
- 0x65, 0x73, 0x73, 0x65, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d,
- 0x6c, 0x22, 0x3e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20,
- 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x3c,
- 0x2f, 0x61, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x20, 0x20,
- 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x73,
- 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x73, 0x68, 0x74, 0x6d,
- 0x6c, 0x22, 0x3e, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x20,
- 0x52, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x3c, 0x2f,
- 0x61, 0x3e, 0xa, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e,
- 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0xa,
- 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0xa, 0xa,
- 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61,
- 0x73, 0x73, 0x3d, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
- 0x74, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0xa, 0x20,
- 0x20, 0x3c, 0x70, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d,
- 0x22, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, 0x74, 0x69,
- 0x74, 0x6c, 0x65, 0x22, 0x3e, 0xa, 0x20, 0x20, 0x57, 0x65,
- 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74,
- 0x68, 0x65, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66,
- 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77,
- 0x77, 0x77, 0x2e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65,
- 0x2f, 0x63, 0x6f, 0x6e, 0x74, 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};
+static const char data_404_html[] = {
+ /* /404.html */
+ 0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
+ 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x20, 0x20, 0x3c,
+ 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c,
+ 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22,
+ 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x63, 0x65, 0x6e,
+ 0x74, 0x65, 0x72, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20,
+ 0x20, 0x3c, 0x68, 0x31, 0x3e, 0x34, 0x30, 0x34, 0x20, 0x2d,
+ 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20,
+ 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x3c, 0x2f, 0x68, 0x31, 0x3e,
+ 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x33,
+ 0x3e, 0x47, 0x6f, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65,
+ 0x66, 0x3d, 0x22, 0x2f, 0x22, 0x3e, 0x68, 0x65, 0x72, 0x65,
+ 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65,
+ 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};
-static const char data_files_shtml[] PROGMEM = {
+static const char data_files_shtml[] = {
/* /files.shtml */
0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
0x25, 0x21, 0x3a, 0x20, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65,
@@ -184,7 +121,93 @@ static const char data_files_shtml[] PROGMEM = {
0x65, 0x3e, 0xa, 0x25, 0x21, 0x3a, 0x20, 0x2f, 0x66, 0x6f,
0x6f, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0};
-static const char data_index_html[] PROGMEM = {
+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};
+
+static const char data_header_html[] = {
+ /* /header.html */
+ 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
+ 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20,
+ 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49,
+ 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f,
+ 0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20,
+ 0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73,
+ 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45,
+ 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
+ 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72,
+ 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34,
+ 0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64,
+ 0x22, 0x3e, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa,
+ 0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x20,
+ 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e,
+ 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x6f,
+ 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x69,
+ 0x6b, 0x69, 0x2d, 0x64, 0x65, 0x6d, 0x6f, 0x20, 0x73, 0x65,
+ 0x72, 0x76, 0x65, 0x72, 0x21, 0x3c, 0x2f, 0x74, 0x69, 0x74,
+ 0x6c, 0x65, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c,
+ 0x69, 0x6e, 0x6b, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x73,
+ 0x74, 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22,
+ 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78,
+ 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x20, 0x68, 0x72, 0x65,
+ 0x66, 0x3d, 0x22, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e,
+ 0x63, 0x73, 0x73, 0x22, 0x3e, 0x20, 0x20, 0xa, 0x20, 0x20,
+ 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x20, 0x20,
+ 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f,
+ 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x66, 0x66, 0x66, 0x65,
+ 0x65, 0x63, 0x22, 0x20, 0x74, 0x65, 0x78, 0x74, 0x3d, 0x22,
+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, 0x22, 0x62, 0x6f, 0x72, 0x64,
+ 0x65, 0x72, 0x2d, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x3e,
+ 0xa, 0x20, 0x20, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65,
+ 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x3c, 0x61,
+ 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74,
+ 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x69,
+ 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74,
+ 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};
+
+static const char data_index_html[] = {
/* /index.html */
0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20,
@@ -244,54 +267,49 @@ static const char data_index_html[] PROGMEM = {
0x73, 0x73, 0x65, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c,
0x22, 0x3e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20, 0x70,
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x3c, 0x2f,
- 0x61, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x20, 0x20, 0x3c,
- 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x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, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x20,
+ 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x3c, 0x61, 0x20,
+ 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70,
+ 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73, 0x69, 0x63,
+ 0x73, 0x2e, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 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, 0x9,
+ 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xa, 0x9, 0x20, 0x20,
0x3c, 0x70, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22,
- 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, 0x74, 0x69, 0x74,
- 0x6c, 0x65, 0x22, 0x3e, 0xa, 0x20, 0x20, 0x57, 0x65, 0x6c,
- 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68,
- 0x65, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d,
- 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77,
- 0x77, 0x2e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f,
- 0x63, 0x6f, 0x6e, 0x74, 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, 0x9, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0xa, 0x9, 0x20, 0x20, 0x3c, 0x70, 0x20, 0x63, 0x6c,
- 0x61, 0x73, 0x73, 0x3d, 0x22, 0x69, 0x6e, 0x74, 0x72, 0x6f,
- 0x22, 0x3e, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x54, 0x68,
- 0x65, 0x20, 0x77, 0x65, 0x62, 0x20, 0x70, 0x61, 0x67, 0x65,
- 0x73, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x61, 0x72, 0x65, 0x20,
- 0x77, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x61,
- 0x72, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20,
- 0x62, 0x79, 0x20, 0x61, 0x20, 0x77, 0x65, 0x62, 0xa, 0x9,
- 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
- 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x75,
- 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x3c,
- 0x61, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x68, 0x72, 0x65,
- 0x66, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f,
- 0x77, 0x77, 0x77, 0x2e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x73,
- 0x65, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6b, 0x69, 0x2f,
- 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6b, 0x69, 0x20,
- 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0xa,
- 0x9, 0x20, 0x20, 0x20, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65,
- 0x6d, 0x3c, 0x2f, 0x61, 0x3e, 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};
+ 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x22, 0x3e, 0xa, 0x9, 0x20,
+ 0x20, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x77, 0x65, 0x62,
+ 0x20, 0x70, 0x61, 0x67, 0x65, 0x73, 0x20, 0x79, 0x6f, 0x75,
+ 0x20, 0x61, 0x72, 0x65, 0x20, 0x77, 0x61, 0x74, 0x63, 0x68,
+ 0x69, 0x6e, 0x67, 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x65,
+ 0x72, 0x76, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x20,
+ 0x77, 0x65, 0x62, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x73,
+ 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x75, 0x6e, 0x6e,
+ 0x69, 0x6e, 0x67, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20,
+ 0x74, 0x68, 0x65, 0x20, 0x3c, 0x61, 0xa, 0x9, 0x20, 0x20,
+ 0x20, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74,
+ 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73,
+ 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6e,
+ 0x74, 0x69, 0x6b, 0x69, 0x2f, 0x22, 0x3e, 0x43, 0x6f, 0x6e,
+ 0x74, 0x69, 0x6b, 0x69, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6e, 0x67, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20,
+ 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3c, 0x2f, 0x61, 0x3e,
+ 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};
-static const char data_style_css[] PROGMEM = {
+static const char data_style_css[] = {
/* /style.css */
0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x63, 0x73, 0x73, 0,
0x68, 0x31, 0x20, 0xa, 0x7b, 0xa, 0x20, 0x20, 0x74, 0x65,
@@ -552,13 +570,7 @@ static const char data_style_css[] PROGMEM = {
0x3b, 0xa, 0xa, 0x7d, 0x20, 0xa, 0xa, 0xa, 0xa, 0xa,
0};
-static const char data_footer_html[] PROGMEM = {
- /* /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};
-
-static const char data_tcp_shtml[] PROGMEM = {
+static const char data_tcp_shtml[] = {
/* /tcp.shtml */
0x2f, 0x74, 0x63, 0x70, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
0x25, 0x21, 0x3a, 0x20, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65,
@@ -584,83 +596,22 @@ static const char data_tcp_shtml[] PROGMEM = {
0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c,
0};
-static const char data_404_html[] PROGMEM = {
- /* /404.html */
- 0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
- 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x20, 0x20, 0x3c,
- 0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c,
- 0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22,
- 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x63, 0x65, 0x6e,
- 0x74, 0x65, 0x72, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20,
- 0x20, 0x3c, 0x68, 0x31, 0x3e, 0x34, 0x30, 0x34, 0x20, 0x2d,
- 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20,
- 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x3c, 0x2f, 0x68, 0x31, 0x3e,
- 0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x33,
- 0x3e, 0x47, 0x6f, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65,
- 0x66, 0x3d, 0x22, 0x2f, 0x22, 0x3e, 0x68, 0x65, 0x72, 0x65,
- 0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65,
- 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};
-
-static const char data_sensor_shtml[] PROGMEM = {
- /* /sensor.shtml */
- 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
- 0x25, 0x21, 0x3a, 0x20, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65,
- 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0xa, 0x3c, 0x68, 0x31,
- 0x3e, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x20, 0x52, 0x65,
- 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x3c, 0x2f, 0x68, 0x31,
- 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x25, 0x21, 0x20, 0x73,
- 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x73, 0xa, 0x25, 0x21, 0x3a,
- 0x20, 0x2f, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x68,
- 0x74, 0x6d, 0x6c, 0xa, 0xa, 0};
-
-static const char data_upload_html[] PROGMEM = {
- /* /upload.html */
- 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
- 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x3c, 0x62, 0x6f,
- 0x64, 0x79, 0x3e, 0xa, 0x3c, 0x66, 0x6f, 0x72, 0x6d, 0x20,
- 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3d, 0x22, 0x75, 0x70,
- 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x22,
- 0x20, 0x65, 0x6e, 0x63, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22,
- 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x61, 0x72, 0x74, 0x2f,
- 0x66, 0x6f, 0x72, 0x6d, 0x2d, 0x64, 0x61, 0x74, 0x61, 0x22,
- 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3d, 0x22, 0x70,
- 0x6f, 0x73, 0x74, 0x22, 0x3e, 0xa, 0x3c, 0x69, 0x6e, 0x70,
- 0x75, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x75,
- 0x73, 0x65, 0x72, 0x66, 0x69, 0x6c, 0x65, 0x22, 0x20, 0x74,
- 0x79, 0x70, 0x65, 0x3d, 0x22, 0x66, 0x69, 0x6c, 0x65, 0x22,
- 0x20, 0x73, 0x69, 0x7a, 0x65, 0x3d, 0x22, 0x35, 0x30, 0x22,
- 0x20, 0x2f, 0x3e, 0xa, 0x3c, 0x69, 0x6e, 0x70, 0x75, 0x74,
- 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3d, 0x22, 0x55, 0x70,
- 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65,
- 0x3d, 0x22, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x22, 0x20,
- 0x2f, 0x3e, 0xa, 0x3c, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x3e,
- 0xa, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xa, 0x3c,
- 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0};
-
const struct httpd_fsdata_file file_processes_shtml[] = {{NULL, data_processes_shtml, data_processes_shtml + 17, sizeof(data_processes_shtml) - 17}};
-const struct httpd_fsdata_file file_header_html[] = {{file_processes_shtml, data_header_html, data_header_html + 13, sizeof(data_header_html) - 13}};
+const struct httpd_fsdata_file file_404_html[] = {{file_processes_shtml, data_404_html, data_404_html + 10, sizeof(data_404_html) - 10}};
-const struct httpd_fsdata_file file_files_shtml[] = {{file_header_html, data_files_shtml, data_files_shtml + 13, sizeof(data_files_shtml) - 13}};
+const struct httpd_fsdata_file file_files_shtml[] = {{file_404_html, data_files_shtml, data_files_shtml + 13, sizeof(data_files_shtml) - 13}};
-const struct httpd_fsdata_file file_index_html[] = {{file_files_shtml, data_index_html, data_index_html + 12, sizeof(data_index_html) - 12}};
+const struct httpd_fsdata_file file_footer_html[] = {{file_files_shtml, data_footer_html, data_footer_html + 13, sizeof(data_footer_html) - 13}};
+
+const struct httpd_fsdata_file file_header_html[] = {{file_footer_html, data_header_html, data_header_html + 13, sizeof(data_header_html) - 13}};
+
+const struct httpd_fsdata_file file_index_html[] = {{file_header_html, data_index_html, data_index_html + 12, sizeof(data_index_html) - 12}};
const struct httpd_fsdata_file file_style_css[] = {{file_index_html, data_style_css, data_style_css + 11, sizeof(data_style_css) - 11}};
-const struct httpd_fsdata_file file_footer_html[] = {{file_style_css, data_footer_html, data_footer_html + 13, sizeof(data_footer_html) - 13}};
+const struct httpd_fsdata_file file_tcp_shtml[] = {{file_style_css, data_tcp_shtml, data_tcp_shtml + 11, sizeof(data_tcp_shtml) - 11}};
-const struct httpd_fsdata_file file_tcp_shtml[] = {{file_footer_html, data_tcp_shtml, data_tcp_shtml + 11, sizeof(data_tcp_shtml) - 11}};
+#define HTTPD_FS_ROOT file_tcp_shtml
-const struct httpd_fsdata_file file_404_html[] = {{file_tcp_shtml, data_404_html, data_404_html + 10, sizeof(data_404_html) - 10}};
-
-const struct httpd_fsdata_file file_sensor_shtml[] = {{file_404_html, data_sensor_shtml, data_sensor_shtml + 14, sizeof(data_sensor_shtml) - 14}};
-
-const struct httpd_fsdata_file file_upload_html[] = {{file_sensor_shtml, data_upload_html, data_upload_html + 13, sizeof(data_upload_html) - 13}};
-
-#define HTTPD_FS_ROOT file_upload_html
-
-#define HTTPD_FS_NUMFILES 10
+#define HTTPD_FS_NUMFILES 8
diff --git a/apps/webserver/httpd.c b/apps/webserver/httpd.c
index 58116cf8e..e98c474f0 100644
--- a/apps/webserver/httpd.c
+++ b/apps/webserver/httpd.c
@@ -30,11 +30,11 @@
*
* Author: Adam Dunkels
*
- * $Id: httpd.c,v 1.10 2008/10/14 09:40:11 julienabeille Exp $
+ * $Id: httpd.c,v 1.11 2008/10/14 11:07:57 adamdunkels Exp $
*/
#include
-
+
#include "contiki-net.h"
#include "webserver.h"
@@ -76,8 +76,7 @@ generate(void *state)
} else {
s->len = s->file.len;
}
-
- httpd_fs_cpy(uip_appdata, s->file.data, s->len);
+ memcpy(uip_appdata, s->file.data, s->len);
return s->len;
}
@@ -87,7 +86,7 @@ PT_THREAD(send_file(struct httpd_state *s))
{
PSOCK_BEGIN(&s->sout);
- do {
+ do {
PSOCK_GENERATOR_SEND(&s->sout, generate, s);
s->file.len -= s->len;
s->file.data += s->len;
@@ -100,27 +99,8 @@ static
PT_THREAD(send_part_of_file(struct httpd_state *s))
{
PSOCK_BEGIN(&s->sout);
-
- static int oldfilelen, oldlen;
- static char * olddata;
-
- //Store stuff that gets clobbered...
- oldfilelen = s->file.len;
- oldlen = s->len;
- olddata = s->file.data;
-
- //How much to send
- s->file.len = s->len;
-
- do {
- PSOCK_GENERATOR_SEND(&s->sout, generate, s);
- s->file.len -= s->len;
- s->file.data += s->len;
- } while(s->file.len > 0);
-
- s->len = oldlen;
- s->file.len = oldfilelen;
- s->file.data = olddata;
+
+ PSOCK_SEND(&s->sout, (uint8_t *)s->file.data, s->len);
PSOCK_END(&s->sout);
}
@@ -130,7 +110,7 @@ next_scriptstate(struct httpd_state *s)
{
char *p;
- if((p = (char *)httpd_fs_strchr(s->scriptptr, ISO_nl)) != NULL) {
+ if((p = strchr(s->scriptptr, ISO_nl)) != NULL) {
p += 1;
s->scriptlen -= (unsigned short)(p - s->scriptptr);
s->scriptptr = p;
@@ -146,28 +126,23 @@ next_scriptstate(struct httpd_state *s)
static
PT_THREAD(handle_script(struct httpd_state *s))
{
- char *ptr;
-
- char filenamebuf[25];
+ char *ptr;
PT_BEGIN(&s->scriptpt);
while(s->file.len > 0) {
/* Check if we should start executing a script. */
- if(httpd_fs_getchar(s->file.data) == ISO_percent &&
- httpd_fs_getchar(s->file.data + 1) == ISO_bang) {
+ if(*s->file.data == ISO_percent &&
+ *(s->file.data + 1) == ISO_bang) {
s->scriptptr = s->file.data + 3;
- s->scriptlen = s->file.len - 3;
-
- memcpy_P(filenamebuf, s->scriptptr, 25);
-
- if(httpd_fs_getchar(s->scriptptr - 1) == ISO_colon) {
- httpd_fs_open(filenamebuf + 1, &s->file);
- PT_WAIT_THREAD(&s->scriptpt, send_file(s));
+ s->scriptlen = s->file.len - 3;
+ if(*(s->scriptptr - 1) == ISO_colon) {
+ httpd_fs_open(s->scriptptr + 1, &s->file);
+ PT_WAIT_THREAD(&s->scriptpt, send_file(s));
} else {
- PT_WAIT_THREAD(&s->scriptpt,
- httpd_cgi(filenamebuf)(s, s->scriptptr));
+ PT_WAIT_THREAD(&s->scriptpt,
+ httpd_cgi(s->scriptptr)(s, s->scriptptr));
}
next_scriptstate(s);
@@ -182,16 +157,16 @@ PT_THREAD(handle_script(struct httpd_state *s))
if(s->file.len > uip_mss()) {
s->len = uip_mss();
} else {
- s->len = s->file.len;
+ s->len = s->file.len;
}
- if(httpd_fs_getchar(s->file.data) == ISO_percent) {
- ptr = (char *) httpd_fs_strchr(s->file.data + 1, ISO_percent);
+ if(*s->file.data == ISO_percent) {
+ ptr = strchr(s->file.data + 1, ISO_percent);
} else {
- ptr = (char *) httpd_fs_strchr(s->file.data, ISO_percent);
+ ptr = strchr(s->file.data, ISO_percent);
}
if(ptr != NULL &&
- ptr != s->file.data) {
+ ptr != s->file.data) {
s->len = (int)(ptr - s->file.data);
if(s->len >= uip_mss()) {
s->len = uip_mss();
@@ -202,7 +177,7 @@ PT_THREAD(handle_script(struct httpd_state *s))
s->file.len -= s->len;
}
}
-
+
PT_END(&s->scriptpt);
}
/*---------------------------------------------------------------------------*/
@@ -268,8 +243,8 @@ PT_THREAD(handle_output(struct httpd_state *s))
/*---------------------------------------------------------------------------*/
static
PT_THREAD(handle_input(struct httpd_state *s))
-{
- PSOCK_BEGIN(&s->sin);
+{
+ PSOCK_BEGIN(&s->sin);
PSOCK_READTO(&s->sin, ISO_space);
diff --git a/apps/webserver/webserver-nogui.h b/apps/webserver/webserver-nogui.h
index 53b9649b5..b362a8d29 100644
--- a/apps/webserver/webserver-nogui.h
+++ b/apps/webserver/webserver-nogui.h
@@ -29,7 +29,7 @@
*
* This file is part of the Contiki OS
*
- * $Id: webserver-nogui.h,v 1.3 2008/10/14 09:40:11 julienabeille Exp $
+ * $Id: webserver-nogui.h,v 1.4 2008/10/14 11:07:57 adamdunkels Exp $
*
*/
#ifndef __WEBSERVER_NOGUI_H__
@@ -38,7 +38,6 @@
#include "contiki-net.h"
PROCESS_NAME(webserver_nogui_process);
-PROCESS_NAME(raven_lcd_process);
void webserver_log(char *msg);
void webserver_log_file(uip_ipaddr_t *requester, char *file);