If there is a delay before data becomes available on a new connection
then the handler function blocks for up to 1 second, and there's another
wait on connection close for up to 2 seconds.
This doesn't make the whole server process asynchronous (there is another
delay between headers/data) but it helps when there are other events
that need attention while handling web requests.
This is needed since when the content-length header is not sent the clients will
wait for data anyways. Sending a content length of zero will tell the client not
to expect any content and it will close the connection immediately.
If RequestHandler::canHandle returns true, but subsequent RequestHandler::handle returns false, we should return some HTTP response instead of an empty one.
In addition to the existing constructors (WiFiServer::WiFiServer(port) and WiFiWebServer::WiFiWebServer(port)), new constructors are added:
WiFiServer::WiFiServer(IPAddress, port) and WiFiWebServer::WiFiWebServer(IPAddress, port).
The terminator should not be sent by sendContent_P. For example, if you
have a null-terminated string, the null itself should not be sent to the
client. This change decrements the number of bytes to send so it does
not include the termination character.
Now makes only one call to .c_str() and using pointer tracking, rather that recalculating offset within the sending loop, to manage data window.
Moved invariant code out of the sending loop body.
* ficeto-esp8266:
add template methods for stream to stream writes to SD and FS
alignment not needed. we use fixed addresses
Rework SPIFFS API to be more Arduino like
fix missed edits
disable automount
fix SPIFFS to work
pull get/set NoDelay for WiFiClient
Add SPIFFS Support
export sketch data folder to the build config
Revert "Revert "Edit SD Server example to use the new Write(Stream) method""
add template client write
Revert "Add WiFiClient.write for Stream"
Revert "Edit SD Server example to use the new Write(Stream) method"
Edit SD Server example to use the new Write(Stream) method
Add WiFiClient.write for Stream
make upload callback packets aligned to defined size
Conflicts:
hardware/esp8266com/esp8266/libraries/ESP8266WebServer/examples/SDWebServer/SDWebServer.ino
hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.cpp
hardware/esp8266com/esp8266/libraries/ESP8266WebServer/src/ESP8266WebServer.h
void onNotFound(bool(void)) handler routes and errors not in the
defined handlers
int args() returns nubmer of currentarguments
String arg(int i) returns the "i" argument value
String argName(int i) returns the "i" argument name(key)
bool hasArg(const char * name) looks up if an argument exist by
seraching for it's key
warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]
warning: defined but not used [-Wunused-variable]
warning: declared 'static' but never defined [-Wunused-function]
warning: suggest parentheses around '&&' within '||' [-Wparentheses}