forked from me-no-dev/ESPAsyncWebServer
optimizations
This commit is contained in:
@@ -173,6 +173,9 @@ void AsyncWebServerRequest::_onAck(size_t len, uint32_t time){
|
||||
if(_response != NULL){
|
||||
if(!_response->_finished()){
|
||||
_response->_ack(this, len, time);
|
||||
if(!_response->_finished() && _client->space()){
|
||||
_response->_ack(this, 0, 0);
|
||||
}
|
||||
} else {
|
||||
AsyncWebServerResponse* r = _response;
|
||||
_response = NULL;
|
||||
|
@@ -397,7 +397,7 @@ AsyncFileResponse::AsyncFileResponse(File content, String path, String contentTy
|
||||
_content = content;
|
||||
_contentLength = _content.size();
|
||||
|
||||
if(!download && String(_content.name()).endsWith(".gz"))
|
||||
if(!download && String(_content.name()).endsWith(".gz") && !path.endsWith(".gz"))
|
||||
addHeader("Content-Encoding", "gzip");
|
||||
|
||||
if(contentType == "")
|
||||
|
Reference in New Issue
Block a user