updated lib & fixed compatibility

pull/30/head
Ondřej Hruška 7 years ago
parent 97e016ca4d
commit be3c0fe926
  1. 2
      libesphttpd
  2. 46
      user/user_main.c

@ -1 +1 @@
Subproject commit 896caa5f82ccd5c441ad30b2558cd4d032b07b30
Subproject commit cc6e7dafa72f5eec9c4eb0b450eab63e758db2cd

@ -119,39 +119,39 @@ general ones. Authorization things (like authBasic) act as a 'barrier' and
should be placed above the URLs they protect.
*/
HttpdBuiltInUrl builtInUrls[]={
{"*", cgiRedirectApClientToHostname, "esp8266.nonet"},
{"/", cgiRedirect, "/index.tpl"},
{"/led.tpl", cgiEspFsTemplate, tplLed},
{"/index.tpl", cgiEspFsTemplate, tplCounter},
{"/led.cgi", cgiLed, NULL},
ROUTE_CGI_ARG("*", cgiRedirectApClientToHostname, "esp8266.nonet"), // redirect func for the captive portal
ROUTE_REDIRECT("/", "/index.tpl"),
ROUTE_TPL("/led.tpl", tplLed),
ROUTE_TPL("/index.tpl", tplCounter),
ROUTE_CGI("/led.cgi", cgiLed),
#ifdef INCLUDE_FLASH_FNS
{"/flash/next", cgiGetFirmwareNext, &uploadParams},
{"/flash/upload", cgiUploadFirmware, &uploadParams},
ROUTE_CGI_ARG("/flash/next", cgiGetFirmwareNext, &uploadParams),
ROUTE_CGI_ARG("/flash/upload", cgiUploadFirmware, &uploadParams),
#endif
{"/flash/reboot", cgiRebootFirmware, NULL},
ROUTE_CGI("/flash/reboot", cgiRebootFirmware),
//Routines to make the /wifi URL and everything beneath it work.
//Enable the line below to protect the WiFi configuration with an username/password combo.
// {"/wifi/*", authBasic, myPassFn},
// ROUTE_AUTH("/wifi/*", myPassFn),
{"/wifi", cgiRedirect, "/wifi/wifi.tpl"},
{"/wifi/", cgiRedirect, "/wifi/wifi.tpl"},
{"/wifi/wifiscan.cgi", cgiWiFiScan, NULL},
{"/wifi/wifi.tpl", cgiEspFsTemplate, tplWlan},
{"/wifi/connect.cgi", cgiWiFiConnect, NULL},
{"/wifi/connstatus.cgi", cgiWiFiConnStatus, NULL},
{"/wifi/setmode.cgi", cgiWiFiSetMode, NULL},
ROUTE_REDIRECT("/wifi", "/wifi/wifi.tpl"),
ROUTE_REDIRECT("/wifi/", "/wifi/wifi.tpl"),
ROUTE_CGI("/wifi/wifiscan.cgi", cgiWiFiScan),
ROUTE_TPL("/wifi/wifi.tpl", tplWlan),
ROUTE_CGI("/wifi/connect.cgi", cgiWiFiConnect),
ROUTE_CGI("/wifi/connstatus.cgi", cgiWiFiConnStatus),
ROUTE_CGI("/wifi/setmode.cgi", cgiWiFiSetMode),
{"/websocket/ws.cgi", cgiWebsocket, myWebsocketConnect},
{"/websocket/echo.cgi", cgiWebsocket, myEchoWebsocketConnect},
ROUTE_WS("/websocket/ws.cgi", myWebsocketConnect),
ROUTE_WS("/websocket/echo.cgi", myEchoWebsocketConnect),
{"/test", cgiRedirect, "/test/index.html"},
{"/test/", cgiRedirect, "/test/index.html"},
{"/test/test.cgi", cgiTestbed, NULL},
ROUTE_REDIRECT("/test", "/test/index.html"),
ROUTE_REDIRECT("/test/", "/test/index.html"),
ROUTE_CGI("/test/test.cgi", cgiTestbed),
{"*", cgiEspFsHook, NULL}, //Catch-all cgi function for the filesystem
{NULL, NULL, NULL}
ROUTE_FILESYSTEM(),
ROUTE_END(),
};

Loading…
Cancel
Save