From b08cd15262920dab3aed33c20b898a9a32863f02 Mon Sep 17 00:00:00 2001 From: Develo Date: Sun, 23 Feb 2020 10:16:12 -0300 Subject: [PATCH 1/2] Update Uri.h --- libraries/ESP8266WebServer/src/Uri.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/ESP8266WebServer/src/Uri.h b/libraries/ESP8266WebServer/src/Uri.h index cb9b68c051..95f5c89360 100644 --- a/libraries/ESP8266WebServer/src/Uri.h +++ b/libraries/ESP8266WebServer/src/Uri.h @@ -12,6 +12,7 @@ class Uri { public: Uri(const char *uri) : _uri(uri) {} Uri(const String &uri) : _uri(uri) {} + Uri(const __FlashStringHelper *uri) : _uri(String(uri)) {} virtual ~Uri() {} virtual Uri* clone() const { From e9b4fbae4a2294e4149702a968e0cee3f146a629 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Sun, 23 Feb 2020 10:01:51 -0800 Subject: [PATCH 2/2] Add a simple test for the new constructor Convert a c-str to a FPSTR in the example to have a section of code in our CI that will catch any future breaks of this specific kind. --- .../ESP8266WebServer/examples/PathArgServer/PathArgServer.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ESP8266WebServer/examples/PathArgServer/PathArgServer.ino b/libraries/ESP8266WebServer/examples/PathArgServer/PathArgServer.ino index c2c7f56884..dc998986e5 100644 --- a/libraries/ESP8266WebServer/examples/PathArgServer/PathArgServer.ino +++ b/libraries/ESP8266WebServer/examples/PathArgServer/PathArgServer.ino @@ -37,7 +37,7 @@ void setup(void) { Serial.println("MDNS responder started"); } - server.on("/", []() { + server.on(F("/"), []() { server.send(200, "text/plain", "hello from esp8266!"); });