The extension -> MIME type routine uses lots of constant strings which end
up in the RODATA segment of RAM. Refactor the comparison to use a table of
strings stored in PMMEM instead, freeing ~370 bytes for the heap.
UMM debugging strings are normally placed in RODATA, which uses up scarse
memory. Move them to PROGMEM and use macros to replace printf with a
version that can handle ROM strings.
The ax_port_malloc, ax_port_calloc, ax_port_realloc, and ax_port_free
functions in WiFiClientSecure are not actually used by the AXTLS library.
It's directly using the library routines, and these function are never
used. Remove these dead bits of code to make the axtls operation clearer.
Every assert() includes a __FILE__ constant string to RODATA which
can be quite large as it includes the complete path as well as
the filename.
Move that string into PMEM, and update the postmortem to work with
either PMEM or RAM strings for dumping abort/assert/exception
information.
Replace volatile with properly placed __sync_synchronize
SPI1W0 is volatile, but when writing multiple words
to the FIFO (which is really just a piece of SRAM),
we don't need to worry about write ordering. We only
need worry about write ordering such that all FIFO
words are written completely before HSPI is told to
use FIFO by setting SPI1CMD |= SPIBUSY;
When WiFiClientSecure::connect was called, it would first tear down and
existing and set up new TCP session, then tear down existing TLS session
(using ssl_free), and then set up a new one. This caused TLS close-
notify alert to be sent to the new TCP session, preventing new session
from being established. This change postpones setting IO ctx to the new
TCP connection, fixing this issue.
Ref https://github.com/esp8266/Arduino/issues/3330
The Generic ESP8266 Module provides the basis to compile for anything not on the current list. Although most current boards use the 26MHz crystal, there are many using the 40MHz. This change permits these to be readily accommodated as generic ESP8266 boards.
WiFiClient write timeouts introduced in #3257 applied to the whole write
operation, which could take long time if data size was large. This
change makes the timeout happen per chunk. Timeout now happens if no
data has been delivered within a given interval.
Some websites have certificates with uppercase letters in CN. This change
makes _verifyDN function accept such certificates by converting all names
to lower case before comparing them.
Resolves#2978
- fix response not being delivered to the browser after upload is done
(https://github.com/esp8266/Arduino/issues/2221)
- if Update.begin fails, don’t attempt to write data
- if update is not successful, send error message from Update to the
client
- move strings into PROGMEM