updated lib & fixed compatibility

pull/30/head
Ondřej Hruška 8 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. should be placed above the URLs they protect.
*/ */
HttpdBuiltInUrl builtInUrls[]={ HttpdBuiltInUrl builtInUrls[]={
{"*", cgiRedirectApClientToHostname, "esp8266.nonet"}, ROUTE_CGI_ARG("*", cgiRedirectApClientToHostname, "esp8266.nonet"), // redirect func for the captive portal
{"/", cgiRedirect, "/index.tpl"}, ROUTE_REDIRECT("/", "/index.tpl"),
{"/led.tpl", cgiEspFsTemplate, tplLed}, ROUTE_TPL("/led.tpl", tplLed),
{"/index.tpl", cgiEspFsTemplate, tplCounter}, ROUTE_TPL("/index.tpl", tplCounter),
{"/led.cgi", cgiLed, NULL}, ROUTE_CGI("/led.cgi", cgiLed),
#ifdef INCLUDE_FLASH_FNS #ifdef INCLUDE_FLASH_FNS
{"/flash/next", cgiGetFirmwareNext, &uploadParams}, ROUTE_CGI_ARG("/flash/next", cgiGetFirmwareNext, &uploadParams),
{"/flash/upload", cgiUploadFirmware, &uploadParams}, ROUTE_CGI_ARG("/flash/upload", cgiUploadFirmware, &uploadParams),
#endif #endif
{"/flash/reboot", cgiRebootFirmware, NULL}, ROUTE_CGI("/flash/reboot", cgiRebootFirmware),
//Routines to make the /wifi URL and everything beneath it work. //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. //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"}, ROUTE_REDIRECT("/wifi", "/wifi/wifi.tpl"),
{"/wifi/", cgiRedirect, "/wifi/wifi.tpl"}, ROUTE_REDIRECT("/wifi/", "/wifi/wifi.tpl"),
{"/wifi/wifiscan.cgi", cgiWiFiScan, NULL}, ROUTE_CGI("/wifi/wifiscan.cgi", cgiWiFiScan),
{"/wifi/wifi.tpl", cgiEspFsTemplate, tplWlan}, ROUTE_TPL("/wifi/wifi.tpl", tplWlan),
{"/wifi/connect.cgi", cgiWiFiConnect, NULL}, ROUTE_CGI("/wifi/connect.cgi", cgiWiFiConnect),
{"/wifi/connstatus.cgi", cgiWiFiConnStatus, NULL}, ROUTE_CGI("/wifi/connstatus.cgi", cgiWiFiConnStatus),
{"/wifi/setmode.cgi", cgiWiFiSetMode, NULL}, ROUTE_CGI("/wifi/setmode.cgi", cgiWiFiSetMode),
{"/websocket/ws.cgi", cgiWebsocket, myWebsocketConnect}, ROUTE_WS("/websocket/ws.cgi", myWebsocketConnect),
{"/websocket/echo.cgi", cgiWebsocket, myEchoWebsocketConnect}, ROUTE_WS("/websocket/echo.cgi", myEchoWebsocketConnect),
{"/test", cgiRedirect, "/test/index.html"}, ROUTE_REDIRECT("/test", "/test/index.html"),
{"/test/", cgiRedirect, "/test/index.html"}, ROUTE_REDIRECT("/test/", "/test/index.html"),
{"/test/test.cgi", cgiTestbed, NULL}, ROUTE_CGI("/test/test.cgi", cgiTestbed),
{"*", cgiEspFsHook, NULL}, //Catch-all cgi function for the filesystem ROUTE_FILESYSTEM(),
{NULL, NULL, NULL} ROUTE_END(),
}; };

Loading…
Cancel
Save