These are chat archives for esp8266/Arduino

6th
Oct 2015
Ivan Grokhotkov
@igrr
Oct 06 2015 12:33
added a draft of RequestHandler interface for ESP8266WebServer
makes handlers a bit more powerful, passing full URI and request method
Steve Nelson
@zenmanenergy
Oct 06 2015 12:55
Do HTTP redirects work with the server.send() method? Anyone know the syntax?
Ivan Grokhotkov
@igrr
Oct 06 2015 13:01
@zenmanenergy this seems to work:
  server.on("/a", []() {
    String redirectUrl = "http://";
    redirectUrl += WiFi.localIP().toString();
    redirectUrl += "/about";

    server.sendHeader("Location", redirectUrl);
    server.send(301, "text/plain", "");
  });
redirects /a to /about
Steve Nelson
@zenmanenergy
Oct 06 2015 13:09
sweetness. thanks
xbary
@xbary
Oct 06 2015 21:00
@igrr After the latest amendments, for me everything works. a RAM average increased space of 10-15%, and 30% flash :)
Ivan Grokhotkov
@igrr
Oct 06 2015 22:01
cool, thanks for testing
For those who were interested in gdb stub, i packed it into a library
xbary
@xbary
Oct 06 2015 22:05
and Windows also GDBdebuger From there?
Martin Ayotte
@martinayotte
Oct 06 2015 22:09
@igrr, Wow ! Thanks a lot !
Ivan Grokhotkov
@igrr
Oct 06 2015 22:09
haven't tried this on windows. xtensa gdb should come along with the toolchain which is installed with the IDE.
note that with current toolchain build stack frames are a bit off...
i'm using a locally-built toolchain which is more up to date, it seems to improve things.
also it helps to change -Os to -Og -g3 in platform.txt (c and cpp flags)
but such change can not be wrapped into a library...