From d790b1cfcaf2abc4f880f615d7903a54481266be Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 4 Mar 2019 18:16:07 +0100 Subject: [PATCH 1/3] 6.4.1.20 Webserver uses chunks 6.4.1.20 20190304 * Changed webserver content handling from single String to small Chunks increasing RAM --- sonoff/_changelog.ino | 5 +- sonoff/sonoff_version.h | 2 +- sonoff/xdrv_01_webserver.ino | 865 ++++++++++++++++++----------------- sonoff/xdrv_02_mqtt.ino | 46 +- sonoff/xdrv_07_domoticz.ino | 53 +-- sonoff/xdrv_09_timers.ino | 96 ++-- sonoff/xdrv_11_knx.ino | 200 +++----- sonoff/xsns_34_hx711.ino | 39 +- 8 files changed, 633 insertions(+), 673 deletions(-) diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 3690ecf4a..f5606578a 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,4 +1,7 @@ -/* 6.4.1.19 20190222 +/* 6.4.1.20 20190304 + * Changed webserver content handling from single String to small Chunks increasing RAM + * + * 6.4.1.19 20190222 * Add command SetOption37 for RGBCW color mapping (#5326) * Add Korean language translations (#5344) * Fix Energy TotalStartTime when commands EnergyReset0 and/or EnergyReset3 used (#5373) diff --git a/sonoff/sonoff_version.h b/sonoff/sonoff_version.h index d4bfa230b..6dc3c6f38 100644 --- a/sonoff/sonoff_version.h +++ b/sonoff/sonoff_version.h @@ -20,7 +20,7 @@ #ifndef _SONOFF_VERSION_H_ #define _SONOFF_VERSION_H_ -#define VERSION 0x06040113 +#define VERSION 0x06040114 #define D_PROGRAMNAME "Sonoff-Tasmota" #define D_AUTHOR "Theo Arends" diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index cbd52ccee..40f8f7fbf 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -27,6 +27,8 @@ #define XDRV_01 1 +#define CHUNKED_BUFFER_SIZE 400 // Chunk buffer size + #ifndef WIFI_SOFT_AP_CHANNEL #define WIFI_SOFT_AP_CHANNEL 1 // Soft Access Point Channel number between 1 and 11 as used by SmartConfig web GUI #endif @@ -49,7 +51,7 @@ const char HTTP_HEAD[] PROGMEM = "
" "" "" - "\").replace(/{m}/g,\" | \").replace(/{e}/g,\" |
---|---|
\").replace(/{m}/g,\" | \").replace(/{e}/g,\" |