Reverted raven changes, which are now in the raven-webserver directory
This commit is contained in:
parent
47a46ded91
commit
28d52894a0
9 changed files with 214 additions and 387 deletions
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the uIP TCP/IP stack.
|
* 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 $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -52,8 +52,6 @@
|
||||||
|
|
||||||
#include "lib/petsciiconv.h"
|
#include "lib/petsciiconv.h"
|
||||||
|
|
||||||
#include "sensors.h"
|
|
||||||
|
|
||||||
static struct httpd_cgi_call *calls = NULL;
|
static struct httpd_cgi_call *calls = NULL;
|
||||||
|
|
||||||
static const char closed[] = /* "CLOSED",*/
|
static const char closed[] = /* "CLOSED",*/
|
||||||
|
@ -100,10 +98,6 @@ static const char proc_name[] = /* "processes"*/
|
||||||
{0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
|
{0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73,
|
||||||
0x65, 0x73, 0};
|
0x65, 0x73, 0};
|
||||||
|
|
||||||
static const char sensor_name[] = "sensors";
|
|
||||||
|
|
||||||
char sensor_temperature[12];
|
|
||||||
|
|
||||||
static const char *states[] = {
|
static const char *states[] = {
|
||||||
closed,
|
closed,
|
||||||
syn_rcvd,
|
syn_rcvd,
|
||||||
|
@ -118,15 +112,6 @@ static const char *states[] = {
|
||||||
running,
|
running,
|
||||||
called};
|
called};
|
||||||
|
|
||||||
uint8_t sprint_ip6(uip_ip6addr_t addr, char * result);
|
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
web_set_temp(char *s)
|
|
||||||
{
|
|
||||||
strcpy(sensor_temperature, s);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static
|
static
|
||||||
PT_THREAD(nullfunction(struct httpd_state *s, char *ptr))
|
PT_THREAD(nullfunction(struct httpd_state *s, char *ptr))
|
||||||
|
@ -172,25 +157,20 @@ make_tcp_stats(void *arg)
|
||||||
struct uip_conn *conn;
|
struct uip_conn *conn;
|
||||||
struct httpd_state *s = (struct httpd_state *)arg;
|
struct httpd_state *s = (struct httpd_state *)arg;
|
||||||
|
|
||||||
uint16_t numprinted;
|
|
||||||
|
|
||||||
conn = &uip_conns[s->u.count];
|
conn = &uip_conns[s->u.count];
|
||||||
|
return snprintf((char *)uip_appdata, uip_mss(),
|
||||||
numprinted = snprintf((char *)uip_appdata, uip_mss(),
|
"<tr align=\"center\"><td>%d</td><td>%u.%u.%u.%u:%u</td><td>%s</td><td>%u</td><td>%u</td><td>%c %c</td></tr>\r\n",
|
||||||
"<tr align=\"center\"><td>%d</td><td>",
|
htons(conn->lport),
|
||||||
htons(conn->lport));
|
conn->ripaddr.u8[0],
|
||||||
|
conn->ripaddr.u8[1],
|
||||||
numprinted += sprint_ip6(conn->ripaddr, uip_appdata + numprinted);
|
conn->ripaddr.u8[2],
|
||||||
numprinted += snprintf((char *)uip_appdata + numprinted, uip_mss() - numprinted,
|
conn->ripaddr.u8[3],
|
||||||
"-%u</td><td>%s</td><td>%u</td><td>%u</td><td>%c %c</td></tr>\r\n",
|
htons(conn->rport),
|
||||||
htons(conn->rport),
|
states[conn->tcpstateflags & UIP_TS_MASK],
|
||||||
states[conn->tcpstateflags & UIP_TS_MASK],
|
conn->nrtx,
|
||||||
conn->nrtx,
|
conn->timer,
|
||||||
conn->timer,
|
(uip_outstanding(conn))? '*':' ',
|
||||||
(uip_outstanding(conn))? '*':' ',
|
(uip_stopped(conn))? '!':' ');
|
||||||
(uip_stopped(conn))? '!':' ');
|
|
||||||
|
|
||||||
return numprinted;
|
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static
|
static
|
||||||
|
@ -233,22 +213,6 @@ PT_THREAD(processes(struct httpd_state *s, char *ptr))
|
||||||
PSOCK_END(&s->sout);
|
PSOCK_END(&s->sout);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static unsigned short
|
|
||||||
generate_sensor_readings(void *arg)
|
|
||||||
{
|
|
||||||
return snprintf((char *)uip_appdata, uip_mss(), "<em>Temperature:</em> %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);
|
|
||||||
}
|
|
||||||
/*---------------------------------------------------------------------------*/
|
|
||||||
void
|
void
|
||||||
httpd_cgi_add(struct httpd_cgi_call *c)
|
httpd_cgi_add(struct httpd_cgi_call *c)
|
||||||
{
|
{
|
||||||
|
@ -267,7 +231,6 @@ httpd_cgi_add(struct httpd_cgi_call *c)
|
||||||
HTTPD_CGI_CALL(file, file_name, file_stats);
|
HTTPD_CGI_CALL(file, file_name, file_stats);
|
||||||
HTTPD_CGI_CALL(tcp, tcp_name, tcp_stats);
|
HTTPD_CGI_CALL(tcp, tcp_name, tcp_stats);
|
||||||
HTTPD_CGI_CALL(proc, proc_name, processes);
|
HTTPD_CGI_CALL(proc, proc_name, processes);
|
||||||
HTTPD_CGI_CALL(sensors, sensor_name, sensor_readings);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
httpd_cgi_init(void)
|
httpd_cgi_init(void)
|
||||||
|
@ -275,56 +238,5 @@ httpd_cgi_init(void)
|
||||||
httpd_cgi_add(&file);
|
httpd_cgi_add(&file);
|
||||||
httpd_cgi_add(&tcp);
|
httpd_cgi_add(&tcp);
|
||||||
httpd_cgi_add(&proc);
|
httpd_cgi_add(&proc);
|
||||||
httpd_cgi_add(&sensors);
|
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the uIP TCP/IP stack.
|
* 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}
|
static struct httpd_cgi_call name = {NULL, str, function}
|
||||||
|
|
||||||
void httpd_cgi_init(void);
|
void httpd_cgi_init(void);
|
||||||
void web_set_temp(char *s);
|
|
||||||
|
|
||||||
#endif /* __HTTPD_CGI_H__ */
|
#endif /* __HTTPD_CGI_H__ */
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $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"
|
#include "contiki-net.h"
|
||||||
|
@ -52,13 +52,13 @@ httpd_fs_strcmp(const char *str1, const char *str2)
|
||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
if( pgm_read_byte(str2 + i) == 0 ||
|
if(str2[i] == 0 ||
|
||||||
str1[i] == '\r' ||
|
str1[i] == '\r' ||
|
||||||
str1[i] == '\n') {
|
str1[i] == '\n') {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(str1[i] != pgm_read_byte(str2 + i)) {
|
if(str1[i] != str2[i]) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $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__
|
#ifndef __HTTPD_FS_H__
|
||||||
#define __HTTPD_FS_H__
|
#define __HTTPD_FS_H__
|
||||||
|
@ -39,8 +39,6 @@
|
||||||
|
|
||||||
#define HTTPD_FS_STATISTICS 1
|
#define HTTPD_FS_STATISTICS 1
|
||||||
|
|
||||||
#include <avr/pgmspace.h>
|
|
||||||
|
|
||||||
struct httpd_fs_file {
|
struct httpd_fs_file {
|
||||||
char *data;
|
char *data;
|
||||||
int len;
|
int len;
|
||||||
|
@ -58,8 +56,4 @@ u16_t httpd_fs_count(char *name);
|
||||||
|
|
||||||
void httpd_fs_init(void);
|
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__ */
|
#endif /* __HTTPD_FS_H__ */
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
<a href="files.shtml">File statistics</a><br>
|
<a href="files.shtml">File statistics</a><br>
|
||||||
<a href="tcp.shtml">Network connections</a><br>
|
<a href="tcp.shtml">Network connections</a><br>
|
||||||
<a href="processes.shtml">System processes</a><br>
|
<a href="processes.shtml">System processes</a><br>
|
||||||
<a href="sensor.shtml">Sensor Readings</a>
|
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
<a href="files.shtml">File statistics</a><br>
|
<a href="files.shtml">File statistics</a><br>
|
||||||
<a href="tcp.shtml">Network connections</a><br>
|
<a href="tcp.shtml">Network connections</a><br>
|
||||||
<a href="processes.shtml">System processes</a><br>
|
<a href="processes.shtml">System processes</a><br>
|
||||||
<a href="sensor.shtml">Sensor Readings</a>
|
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
static const char data_processes_shtml[] PROGMEM = {
|
static const char data_processes_shtml[] = {
|
||||||
/* /processes.shtml */
|
/* /processes.shtml */
|
||||||
0x2f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
|
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,
|
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,
|
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, 0};
|
||||||
|
|
||||||
static const char data_header_html[] PROGMEM = {
|
static const char data_404_html[] = {
|
||||||
/* /header.html */
|
/* /404.html */
|
||||||
0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
|
0x2f, 0x34, 0x30, 0x34, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
|
||||||
0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20,
|
0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0x20, 0x20, 0x3c,
|
||||||
0x48, 0x54, 0x4d, 0x4c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49,
|
0x62, 0x6f, 0x64, 0x79, 0x20, 0x62, 0x67, 0x63, 0x6f, 0x6c,
|
||||||
0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f,
|
0x6f, 0x72, 0x3d, 0x22, 0x77, 0x68, 0x69, 0x74, 0x65, 0x22,
|
||||||
0x2f, 0x44, 0x54, 0x44, 0x20, 0x48, 0x54, 0x4d, 0x4c, 0x20,
|
0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x63, 0x65, 0x6e,
|
||||||
0x34, 0x2e, 0x30, 0x31, 0x20, 0x54, 0x72, 0x61, 0x6e, 0x73,
|
0x74, 0x65, 0x72, 0x3e, 0xa, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||||
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2f, 0x2f, 0x45,
|
0x20, 0x3c, 0x68, 0x31, 0x3e, 0x34, 0x30, 0x34, 0x20, 0x2d,
|
||||||
0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
|
0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20,
|
||||||
0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72,
|
0x66, 0x6f, 0x75, 0x6e, 0x64, 0x3c, 0x2f, 0x68, 0x31, 0x3e,
|
||||||
0x67, 0x2f, 0x54, 0x52, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x34,
|
0xa, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x33,
|
||||||
0x2f, 0x6c, 0x6f, 0x6f, 0x73, 0x65, 0x2e, 0x64, 0x74, 0x64,
|
0x3e, 0x47, 0x6f, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65,
|
||||||
0x22, 0x3e, 0xa, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa,
|
0x66, 0x3d, 0x22, 0x2f, 0x22, 0x3e, 0x68, 0x65, 0x72, 0x65,
|
||||||
0x20, 0x20, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0xa, 0x20,
|
0x3c, 0x2f, 0x61, 0x3e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65,
|
||||||
0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e,
|
0x61, 0x64, 0x2e, 0x3c, 0x2f, 0x68, 0x33, 0x3e, 0xa, 0x20,
|
||||||
0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x6f,
|
0x20, 0x20, 0x20, 0x3c, 0x2f, 0x63, 0x65, 0x6e, 0x74, 0x65,
|
||||||
0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x69,
|
0x72, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x62, 0x6f, 0x64,
|
||||||
0x6b, 0x69, 0x2d, 0x64, 0x65, 0x6d, 0x6f, 0x20, 0x73, 0x65,
|
0x79, 0x3e, 0xa, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e,
|
||||||
0x72, 0x76, 0x65, 0x72, 0x21, 0x3c, 0x2f, 0x74, 0x69, 0x74,
|
0};
|
||||||
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_files_shtml[] PROGMEM = {
|
static const char data_files_shtml[] = {
|
||||||
/* /files.shtml */
|
/* /files.shtml */
|
||||||
0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
|
0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
|
||||||
0x25, 0x21, 0x3a, 0x20, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65,
|
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,
|
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, 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,
|
||||||
|
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, 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_index_html[] = {
|
||||||
/* /index.html */
|
/* /index.html */
|
||||||
0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
|
0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0,
|
||||||
0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20,
|
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,
|
0x73, 0x73, 0x65, 0x73, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c,
|
||||||
0x22, 0x3e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20, 0x70,
|
0x22, 0x3e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20, 0x70,
|
||||||
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x3c, 0x2f,
|
0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x73, 0x3c, 0x2f,
|
||||||
0x61, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xa, 0x20, 0x20, 0x3c,
|
0x61, 0x3e, 0x3c, 0x62, 0x72, 0x3e, 0xa, 0xa, 0x20, 0x20,
|
||||||
0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x73, 0x65,
|
0x3c, 0x2f, 0x70, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x64,
|
||||||
0x6e, 0x73, 0x6f, 0x72, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c,
|
0x69, 0x76, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69,
|
||||||
0x22, 0x3e, 0x53, 0x65, 0x6e, 0x73, 0x6f, 0x72, 0x20, 0x52,
|
0x76, 0x3e, 0xa, 0xa, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76,
|
||||||
0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x3c, 0x2f, 0x61,
|
0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x63, 0x6f,
|
||||||
0x3e, 0xa, 0xa, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0xa,
|
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x62, 0x6c, 0x6f, 0x63, 0x6b,
|
||||||
0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0xa, 0x20,
|
0x22, 0x3e, 0xa, 0x20, 0x20, 0x3c, 0x70, 0x20, 0x63, 0x6c,
|
||||||
0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0xa, 0xa, 0x20,
|
0x61, 0x73, 0x73, 0x3d, 0x22, 0x62, 0x6f, 0x72, 0x64, 0x65,
|
||||||
0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73,
|
0x72, 0x2d, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x22, 0x3e, 0xa,
|
||||||
0x73, 0x3d, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
|
0x20, 0x20, 0x57, 0x65, 0x6c, 0x63, 0x6f, 0x6d, 0x65, 0x20,
|
||||||
0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x3e, 0xa, 0x20, 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,
|
0x3c, 0x70, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22,
|
||||||
0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2d, 0x74, 0x69, 0x74,
|
0x69, 0x6e, 0x74, 0x72, 0x6f, 0x22, 0x3e, 0xa, 0x9, 0x20,
|
||||||
0x6c, 0x65, 0x22, 0x3e, 0xa, 0x20, 0x20, 0x57, 0x65, 0x6c,
|
0x20, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x77, 0x65, 0x62,
|
||||||
0x63, 0x6f, 0x6d, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68,
|
0x20, 0x70, 0x61, 0x67, 0x65, 0x73, 0x20, 0x79, 0x6f, 0x75,
|
||||||
0x65, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d,
|
0x20, 0x61, 0x72, 0x65, 0x20, 0x77, 0x61, 0x74, 0x63, 0x68,
|
||||||
0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77,
|
0x69, 0x6e, 0x67, 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x65,
|
||||||
0x77, 0x2e, 0x73, 0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f,
|
0x72, 0x76, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x20,
|
||||||
0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6b, 0x69, 0x2f, 0x22, 0x3e,
|
0x77, 0x65, 0x62, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x73,
|
||||||
0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6b, 0x69, 0x3c, 0x2f, 0x61,
|
0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x72, 0x75, 0x6e, 0x6e,
|
||||||
0x3e, 0x20, 0xa, 0x20, 0x20, 0x77, 0x65, 0x62, 0x20, 0x73,
|
0x69, 0x6e, 0x67, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20,
|
||||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x21, 0xa, 0x20, 0x20, 0x3c,
|
0x74, 0x68, 0x65, 0x20, 0x3c, 0x61, 0xa, 0x9, 0x20, 0x20,
|
||||||
0x2f, 0x70, 0x3e, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x20,
|
0x20, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x68, 0x74,
|
||||||
0x20, 0xa, 0x9, 0x20, 0x20, 0x3c, 0x70, 0x20, 0x63, 0x6c,
|
0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x73,
|
||||||
0x61, 0x73, 0x73, 0x3d, 0x22, 0x69, 0x6e, 0x74, 0x72, 0x6f,
|
0x69, 0x63, 0x73, 0x2e, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6e,
|
||||||
0x22, 0x3e, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20, 0x54, 0x68,
|
0x74, 0x69, 0x6b, 0x69, 0x2f, 0x22, 0x3e, 0x43, 0x6f, 0x6e,
|
||||||
0x65, 0x20, 0x77, 0x65, 0x62, 0x20, 0x70, 0x61, 0x67, 0x65,
|
0x74, 0x69, 0x6b, 0x69, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61,
|
||||||
0x73, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x61, 0x72, 0x65, 0x20,
|
0x74, 0x69, 0x6e, 0x67, 0xa, 0x9, 0x20, 0x20, 0x20, 0x20,
|
||||||
0x77, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x61,
|
0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3c, 0x2f, 0x61, 0x3e,
|
||||||
0x72, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20,
|
0x2e, 0xa, 0x9, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0xa,
|
||||||
0x62, 0x79, 0x20, 0x61, 0x20, 0x77, 0x65, 0x62, 0xa, 0x9,
|
0xa, 0x9, 0x20, 0x20, 0xa, 0x9, 0x20, 0xa, 0x20, 0x20,
|
||||||
0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
|
0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0xa, 0x3c, 0x2f,
|
||||||
0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x75,
|
0x68, 0x74, 0x6d, 0x6c, 0x3e, 0xa, 0};
|
||||||
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 */
|
/* /style.css */
|
||||||
0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x63, 0x73, 0x73, 0,
|
0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x2e, 0x63, 0x73, 0x73, 0,
|
||||||
0x68, 0x31, 0x20, 0xa, 0x7b, 0xa, 0x20, 0x20, 0x74, 0x65,
|
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,
|
0x3b, 0xa, 0xa, 0x7d, 0x20, 0xa, 0xa, 0xa, 0xa, 0xa,
|
||||||
0};
|
0};
|
||||||
|
|
||||||
static const char data_footer_html[] PROGMEM = {
|
static const char data_tcp_shtml[] = {
|
||||||
/* /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 = {
|
|
||||||
/* /tcp.shtml */
|
/* /tcp.shtml */
|
||||||
0x2f, 0x74, 0x63, 0x70, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
|
0x2f, 0x74, 0x63, 0x70, 0x2e, 0x73, 0x68, 0x74, 0x6d, 0x6c, 0,
|
||||||
0x25, 0x21, 0x3a, 0x20, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65,
|
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,
|
0x6f, 0x6f, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x6d, 0x6c,
|
||||||
0};
|
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_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_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}};
|
#define HTTPD_FS_NUMFILES 8
|
||||||
|
|
||||||
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
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
*
|
*
|
||||||
* Author: Adam Dunkels <adam@sics.se>
|
* Author: Adam Dunkels <adam@sics.se>
|
||||||
*
|
*
|
||||||
* $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 <string.h>
|
#include <string.h>
|
||||||
|
@ -76,8 +76,7 @@ generate(void *state)
|
||||||
} else {
|
} else {
|
||||||
s->len = s->file.len;
|
s->len = s->file.len;
|
||||||
}
|
}
|
||||||
|
memcpy(uip_appdata, s->file.data, s->len);
|
||||||
httpd_fs_cpy(uip_appdata, s->file.data, s->len);
|
|
||||||
|
|
||||||
return s->len;
|
return s->len;
|
||||||
}
|
}
|
||||||
|
@ -101,26 +100,7 @@ PT_THREAD(send_part_of_file(struct httpd_state *s))
|
||||||
{
|
{
|
||||||
PSOCK_BEGIN(&s->sout);
|
PSOCK_BEGIN(&s->sout);
|
||||||
|
|
||||||
static int oldfilelen, oldlen;
|
PSOCK_SEND(&s->sout, (uint8_t *)s->file.data, s->len);
|
||||||
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_END(&s->sout);
|
PSOCK_END(&s->sout);
|
||||||
}
|
}
|
||||||
|
@ -130,7 +110,7 @@ next_scriptstate(struct httpd_state *s)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if((p = (char *)httpd_fs_strchr(s->scriptptr, ISO_nl)) != NULL) {
|
if((p = strchr(s->scriptptr, ISO_nl)) != NULL) {
|
||||||
p += 1;
|
p += 1;
|
||||||
s->scriptlen -= (unsigned short)(p - s->scriptptr);
|
s->scriptlen -= (unsigned short)(p - s->scriptptr);
|
||||||
s->scriptptr = p;
|
s->scriptptr = p;
|
||||||
|
@ -148,26 +128,21 @@ PT_THREAD(handle_script(struct httpd_state *s))
|
||||||
{
|
{
|
||||||
char *ptr;
|
char *ptr;
|
||||||
|
|
||||||
char filenamebuf[25];
|
|
||||||
|
|
||||||
PT_BEGIN(&s->scriptpt);
|
PT_BEGIN(&s->scriptpt);
|
||||||
|
|
||||||
while(s->file.len > 0) {
|
while(s->file.len > 0) {
|
||||||
|
|
||||||
/* Check if we should start executing a script. */
|
/* Check if we should start executing a script. */
|
||||||
if(httpd_fs_getchar(s->file.data) == ISO_percent &&
|
if(*s->file.data == ISO_percent &&
|
||||||
httpd_fs_getchar(s->file.data + 1) == ISO_bang) {
|
*(s->file.data + 1) == ISO_bang) {
|
||||||
s->scriptptr = s->file.data + 3;
|
s->scriptptr = s->file.data + 3;
|
||||||
s->scriptlen = s->file.len - 3;
|
s->scriptlen = s->file.len - 3;
|
||||||
|
if(*(s->scriptptr - 1) == ISO_colon) {
|
||||||
memcpy_P(filenamebuf, s->scriptptr, 25);
|
httpd_fs_open(s->scriptptr + 1, &s->file);
|
||||||
|
PT_WAIT_THREAD(&s->scriptpt, send_file(s));
|
||||||
if(httpd_fs_getchar(s->scriptptr - 1) == ISO_colon) {
|
|
||||||
httpd_fs_open(filenamebuf + 1, &s->file);
|
|
||||||
PT_WAIT_THREAD(&s->scriptpt, send_file(s));
|
|
||||||
} else {
|
} else {
|
||||||
PT_WAIT_THREAD(&s->scriptpt,
|
PT_WAIT_THREAD(&s->scriptpt,
|
||||||
httpd_cgi(filenamebuf)(s, s->scriptptr));
|
httpd_cgi(s->scriptptr)(s, s->scriptptr));
|
||||||
}
|
}
|
||||||
next_scriptstate(s);
|
next_scriptstate(s);
|
||||||
|
|
||||||
|
@ -182,16 +157,16 @@ PT_THREAD(handle_script(struct httpd_state *s))
|
||||||
if(s->file.len > uip_mss()) {
|
if(s->file.len > uip_mss()) {
|
||||||
s->len = uip_mss();
|
s->len = uip_mss();
|
||||||
} else {
|
} else {
|
||||||
s->len = s->file.len;
|
s->len = s->file.len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(httpd_fs_getchar(s->file.data) == ISO_percent) {
|
if(*s->file.data == ISO_percent) {
|
||||||
ptr = (char *) httpd_fs_strchr(s->file.data + 1, ISO_percent);
|
ptr = strchr(s->file.data + 1, ISO_percent);
|
||||||
} else {
|
} else {
|
||||||
ptr = (char *) httpd_fs_strchr(s->file.data, ISO_percent);
|
ptr = strchr(s->file.data, ISO_percent);
|
||||||
}
|
}
|
||||||
if(ptr != NULL &&
|
if(ptr != NULL &&
|
||||||
ptr != s->file.data) {
|
ptr != s->file.data) {
|
||||||
s->len = (int)(ptr - s->file.data);
|
s->len = (int)(ptr - s->file.data);
|
||||||
if(s->len >= uip_mss()) {
|
if(s->len >= uip_mss()) {
|
||||||
s->len = uip_mss();
|
s->len = uip_mss();
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki OS
|
* 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__
|
#ifndef __WEBSERVER_NOGUI_H__
|
||||||
|
@ -38,7 +38,6 @@
|
||||||
#include "contiki-net.h"
|
#include "contiki-net.h"
|
||||||
|
|
||||||
PROCESS_NAME(webserver_nogui_process);
|
PROCESS_NAME(webserver_nogui_process);
|
||||||
PROCESS_NAME(raven_lcd_process);
|
|
||||||
|
|
||||||
void webserver_log(char *msg);
|
void webserver_log(char *msg);
|
||||||
void webserver_log_file(uip_ipaddr_t *requester, char *file);
|
void webserver_log_file(uip_ipaddr_t *requester, char *file);
|
||||||
|
|
Loading…
Reference in a new issue