fix typos

This commit is contained in:
Me No Dev
2016-06-17 01:53:21 +03:00
parent 3709dd5e14
commit d8809137a3
3 changed files with 5 additions and 5 deletions

View File

@@ -77,7 +77,7 @@ bool AsyncStaticWebHandler::_getFile(AsyncWebServerRequest *request)
path += "/"; path += "/";
path += "index.htm"; path += "index.htm";
return_fileExists(request, path); return _fileExists(request, path);
} }
bool AsyncStaticWebHandler::_fileExists(AsyncWebServerRequest *request, const String path) bool AsyncStaticWebHandler::_fileExists(AsyncWebServerRequest *request, const String path)

View File

@@ -95,7 +95,7 @@ AsyncWebServerRequest::~AsyncWebServerRequest(){
} }
if(_tempObject != NULL){ if(_tempObject != NULL){
delete _tempObject; free(_tempObject);
} }
} }

View File

@@ -381,9 +381,9 @@ AsyncFileResponse::AsyncFileResponse(File content, String contentType, bool down
_content = content; _content = content;
_path = String(_content.name()); _path = String(_content.name());
_contentLength = _content.size(); _contentLength = _content.size();
int filenameStart = path.lastIndexOf('/') + 1; int filenameStart = _path.lastIndexOf('/') + 1;
char buf[26+path.length()-filenameStart]; char buf[26+_path.length()-filenameStart];
char* filename = (char*)path.c_str() + filenameStart; char* filename = (char*)_path.c_str() + filenameStart;
if(!download && _path.endsWith(".gz")) if(!download && _path.endsWith(".gz"))
addHeader("Content-Encoding", "gzip"); addHeader("Content-Encoding", "gzip");