Skip to content

Commit 008cc55

Browse files
committed
Updated update GUI, should fix #25
1 parent 188394a commit 008cc55

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

gui

src/web_server.cpp

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,29 @@ static const char _DUMMY_PASSWORD[] PROGMEM = "_DUMMY_PASSWORD";
6363
#define ESCAPEQUOTE(A) TEXTIFY(A)
6464
String currentfirmware = ESCAPEQUOTE(BUILD_TAG);
6565

66-
void dumpRequest(MongooseHttpServerRequest *request) {
66+
void dumpRequest(MongooseHttpServerRequest *request)
67+
{
68+
DBUGF("host.length = %d", request->host().length());
69+
DBUGF("host.c_str = %p", request->host().c_str());
70+
DBUGF("uri.length = %d", request->uri().length());
71+
DBUGF("uri.c_str = %p", request->uri().c_str());
72+
6773
if(request->method() == HTTP_GET) {
68-
DBUGF("GET");
74+
DBUG("GET");
6975
} else if(request->method() == HTTP_POST) {
70-
DBUGF("POST");
76+
DBUG("POST");
7177
} else if(request->method() == HTTP_DELETE) {
72-
DBUGF("DELETE");
78+
DBUG("DELETE");
7379
} else if(request->method() == HTTP_PUT) {
74-
DBUGF("PUT");
80+
DBUG("PUT");
7581
} else if(request->method() == HTTP_PATCH) {
76-
DBUGF("PATCH");
82+
DBUG("PATCH");
7783
} else if(request->method() == HTTP_HEAD) {
78-
DBUGF("HEAD");
84+
DBUG("HEAD");
7985
} else if(request->method() == HTTP_OPTIONS) {
80-
DBUGF("OPTIONS");
86+
DBUG("OPTIONS");
8187
} else {
82-
DBUGF("UNKNOWN");
88+
DBUG("UNKNOWN");
8389
}
8490
DBUGF(" http://%.*s%.*s",
8591
request->host().length(), request->host().c_str(),
@@ -511,10 +517,6 @@ handleStatus(MongooseHttpServerRequest *request) {
511517
#endif
512518
s += "}";
513519

514-
DBUGVAR(lastUpdate);
515-
DBUGVAR(millis());
516-
DBUGVAR((millis() - lastUpdate) / 1000);
517-
518520
response->setCode(200);
519521
response->print(s);
520522
request->send(response);
@@ -724,6 +726,8 @@ handleUpdatePost(MongooseHttpServerRequest *request) {
724726
if(false == requestPreProcess(request, upgradeResponse, CONTENT_TYPE_TEXT)) {
725727
return;
726728
}
729+
730+
// TODO: Add support for returning 100: Continue
727731
}
728732

729733
static int lastPercent = -1;

0 commit comments

Comments
 (0)