Skip to content

Commit 188394a

Browse files
committed
Temp fix for #17.
Use HTML to also specify the redirect. Will show the 'OpenEVSE' page briefely but redirect automatically.
1 parent 3d5c021 commit 188394a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/web_server.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ handleRapi(MongooseHttpServerRequest *request) {
887887
}
888888
else
889889
{
890-
String errorString =
890+
String errorString =
891891
RAPI_RESPONSE_QUEUE_FULL == ret ? F("RAPI_RESPONSE_QUEUE_FULL") :
892892
RAPI_RESPONSE_BUFFER_OVERFLOW == ret ? F("RAPI_RESPONSE_BUFFER_OVERFLOW") :
893893
RAPI_RESPONSE_TIMEOUT == ret ? F("RAPI_RESPONSE_TIMEOUT") :
@@ -939,9 +939,12 @@ void handleNotFound(MongooseHttpServerRequest *request)
939939
String url = F("http://");
940940
url += ipaddress;
941941

942-
String s = F("<html><body><a href=\"");
942+
String s = F("<html>");
943+
s += F("<head><meta http-equiv=\"Refresh\" content=\"0; url=");
943944
s += url;
944-
s += F("\">OpenEVES</a></body></html>");
945+
s += F("\" /></head><body><a href=\"");
946+
s += url;
947+
s += F("\">OpenEVSE</a></body></html>");
945948

946949
response->setCode(301);
947950
response->addHeader(F("Location"), url);

0 commit comments

Comments
 (0)