* 1st draft to serve static files faster
* Allow serving 5 images in a page
the 6th image cannot be served as the esp does not open more than 5 connections at the same time
* win the prize
* Update comments
* Fixed global assignment that should be local
Made result variable be local, see Issue #113
* Made global variable local
Made ASCII variable be local, see Issue #113
* Made more variables local
Related to Issue #113. questionMarkPos, and b,c,d,e,f all are global in scope, and are not cleared from memory, so leak.
Frankly, b, c, d, e, and f are not used either, but will now get GC'd later, if they ever were assigned, so not problematic
line 114 also has _ and i to make local too, so were put on their own line.
i on line 24 also was unnecessarily global, and undetected in issue #113
* Made module more local
Made the basicAuth table local in scope. Since it is returned when dofile is called in httpserver.lua, that already has a correctly scoped table, 'auth'. This is related to issue #113, and should reduce memory loss to globals
* Made bufferedConnection local
bufferedConnection was global and didn't have to be. Part of issue #113.
Now no longer remains in _G (globals table) after a connection has closed.
* allow uploading files not only to http + replace symbol images by unicode symbols
allow uploading files to root dir and http.
+ replace symbol images by unicode symbols
* backend for uploading arbitrary files
* fix uploading to http
appending '.dnl' to the filename shortens the available filename length by 4 chars. Now a long filename ist cut off first and then the dnl is appended resulting in a unique but short enough temp filename.
* Move server initialization out of init.lua and into new httpserver-init.lua
* Use wildcard for finding server files to upload.
* Break init.lua up into 3 files. Move all configuration to httpserver.conf.
New files are:
* httpserver-compile.lua
* httpserver-wifi.lua
* httpserver-init.lua
* script for controlling garage that is aware of door states
* Overhaul garage door example
Hardware now calls for reed relay in order to be able to tell the state
of the switch. This way, we can have distinct open/close operations
that error if the door is already in that state. Allows for potential
better integration with home automation systems.
* Prepare for push to GitHub
* Restore defaults
* Make HTTP auth realm match zeroconf networking name
sometimes I observe requests which are malformed (seem to be binary
data) so everything that does not have a method and request (url)
defined gets kicked.
Use wifi.eventmon to start server once we have IP, rather than checking
in a loop.
Use wifi.eventmon to restart server if connection is lost.
Use a timer to check if we ever even got a connection after 30 seconds.
Cleaned some other things up.