optimizations
This commit is contained in:
parent
bfde9bc81a
commit
7110758b5a
|
@ -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 == "")
|
||||
|
|
Loading…
Reference in New Issue