add more debug message

This commit is contained in:
Luc 2021-02-10 13:49:14 +01:00
parent 9668df134d
commit ab024d4c0f
3 changed files with 4 additions and 0 deletions

View File

@ -42,6 +42,7 @@ void HTTP_Server:: handle_not_found()
String path = _webserver->urlDecode(_webserver->uri()); String path = _webserver->urlDecode(_webserver->uri());
String contentType = getContentType(path.c_str()); String contentType = getContentType(path.c_str());
String pathWithGz = path + ".gz"; String pathWithGz = path + ".gz";
log_esp3d("URI: %s", path.c_str());
#if defined (FILESYSTEM_FEATURE) #if defined (FILESYSTEM_FEATURE)
if(ESP_FileSystem::exists(pathWithGz.c_str()) || ESP_FileSystem::exists(path.c_str())) { if(ESP_FileSystem::exists(pathWithGz.c_str()) || ESP_FileSystem::exists(path.c_str())) {
log_esp3d("Path found `%s`", path.c_str()); log_esp3d("Path found `%s`", path.c_str());

View File

@ -50,6 +50,7 @@ void HTTP_Server::MKSFileupload ()
size_t fileSize = 0 ; size_t fileSize = 0 ;
String filename = upload.filename; String filename = upload.filename;
String sfilename = "s"+filename; String sfilename = "s"+filename;
log_esp3d("Filename: %s",filename.c_str() );
//No / in filename //No / in filename
if (filename[0]=='/') { if (filename[0]=='/') {
filename.remove(0,1); filename.remove(0,1);
@ -85,6 +86,7 @@ void HTTP_Server::MKSFileupload ()
fileSize = _webserver->header("Content-Length").toInt(); fileSize = _webserver->header("Content-Length").toInt();
} }
fragmentID = 0; fragmentID = 0;
log_esp3d("Filename: %s Size:%d",filename.c_str(), fileSize);
if (MKSService::sendFirstFragment(filename.c_str(), fileSize)) { if (MKSService::sendFirstFragment(filename.c_str(), fileSize)) {
MKSService::uploadMode(); MKSService::uploadMode();
} }

View File

@ -156,6 +156,7 @@ bool HTTP_Server::StreamSDFile(const char* filename, const char * contentType)
void HTTP_Server::pushError(int code, const char * st, uint16_t web_error, uint16_t timeout) void HTTP_Server::pushError(int code, const char * st, uint16_t web_error, uint16_t timeout)
{ {
log_esp3d("%s:%d",st,web_error);
if (websocket_terminal_server.started() && st) { if (websocket_terminal_server.started() && st) {
String s = "ERROR:" + String(code) + ":"; String s = "ERROR:" + String(code) + ":";
s+=st; s+=st;