Update WiFiManager.cpp

This commit is contained in:
Jasper
2018-02-13 19:52:38 +08:00
committed by GitHub
parent aa734eb606
commit a94d897ee4
+10 -10
View File
@@ -143,14 +143,14 @@ void WiFiManager::setupConfigPortal() {
dnsServer->start(DNS_PORT, "*", WiFi.softAPIP());
/* Setup web pages: root, wifi config pages, SO captive portal detectors and not found. */
server->on("/", std::bind(&WiFiManager::handleRoot, this));
server->on("/wifi", std::bind(&WiFiManager::handleWifi, this, true));
server->on("/0wifi", std::bind(&WiFiManager::handleWifi, this, false));
server->on("/wifisave", std::bind(&WiFiManager::handleWifiSave, this));
server->on("/i", std::bind(&WiFiManager::handleInfo, this));
server->on("/r", std::bind(&WiFiManager::handleReset, this));
server->on(String(F("/")), std::bind(&WiFiManager::handleRoot, this));
server->on(String(F("/wifi")), std::bind(&WiFiManager::handleWifi, this, true));
server->on(String(F("/0wifi")), std::bind(&WiFiManager::handleWifi, this, false));
server->on(String(F("/wifisave")), std::bind(&WiFiManager::handleWifiSave, this));
server->on(String(F("/i")), std::bind(&WiFiManager::handleInfo, this));
server->on(String(F("/r")), std::bind(&WiFiManager::handleReset, this));
//server->on("/generate_204", std::bind(&WiFiManager::handle204, this)); //Android/Chrome OS captive portal check.
server->on("/fwlink", std::bind(&WiFiManager::handleRoot, this)); //Microsoft captive portal. Maybe not needed. Might be handled by notFound handler.
server->on(String(F("/fwlink")), std::bind(&WiFiManager::handleRoot, this)); //Microsoft captive portal. Maybe not needed. Might be handled by notFound handler.
server->onNotFound (std::bind(&WiFiManager::handleNotFound, this));
server->begin(); // Web server start
DEBUG_WM(F("HTTP server started"));
@@ -413,10 +413,10 @@ void WiFiManager::handleRoot() {
page += FPSTR(HTTP_STYLE);
page += _customHeadElement;
page += FPSTR(HTTP_HEAD_END);
page += "<h1>";
page += String(F("<h1>"));
page += _apName;
page += "</h1>";
page += F("<h3>WiFiManager</h3>");
page += String(F("</h1>"));
page += Strint(F("<h3>WiFiManager</h3>"));
page += FPSTR(HTTP_PORTAL_OPTIONS);
page += FPSTR(HTTP_END);