forked from me-no-dev/ESPAsyncWebServer
Bug fix (#45)
* HTTP 302 and 304 Support
Add support for http redirection (302) and http not modified (304) to
reduce the load the server.
server.redirect(“url”, “location”, exclude-ip) will respond with 302 to
redirect the browser to a different url, this is useful for backward
compatibility and to redirect call to CDN when not no AP mode.
server.serveStatic has a new optional parameter to get the
Last-Modified date for all files serve for this location, when the
browser request have the same If-Modified-Since header value, the
server respond with 304 code instead of serving the file.
* First round of performance improvements.
* Merge remote-tracking branch 'me-no-dev/master' into performance
# Conflicts:
# src/WebHandlerImpl.h
# src/WebHandlers.cpp
* use of sprintf
* Remove sections not related.
* Fix a bug to serve a file in directory (e.g. serverStatic("/", SPIFFS, "/index.html");
This commit is contained in:
+1
-1
@@ -117,7 +117,7 @@ void AsyncWebServerRequest::_onData(void *buf, size_t len){
|
||||
_temp.concat(str);
|
||||
_temp.trim();
|
||||
_parseLine();
|
||||
if (++i < len) _onData(buf+i, len-i); // Still have more buffer to process
|
||||
if (++i < len) _onData(str+i, len-i); // Still have more buffer to process
|
||||
}
|
||||
} else if(_parseState == PARSE_REQ_BODY){
|
||||
if(_isMultipart){
|
||||
|
||||
Reference in New Issue
Block a user