1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Add plain char* signatures WebServer::sendContent (#6341)

Fixes #2567

Allow the web server to send plain C strings instead of requring they be
encapsulated inside a String class object.  Saves memory vs. having to
convert C strings to Strings (i.e. duplication of data), overloads on
the efficient sendContent_P(char*) methods.
This commit is contained in:
Earle F. Philhower, III 2019-07-25 04:39:57 -07:00 committed by david gauchard
parent 34077c03f5
commit aa0bc3372f

View File

@ -135,6 +135,8 @@ public:
void sendContent(const String& content);
void sendContent_P(PGM_P content);
void sendContent_P(PGM_P content, size_t size);
void sendContent(const char *content) { sendContent_P(content); }
void sendContent(const char *content, size_t size) { sendContent_P(content, size); }
static String credentialHash(const String& username, const String& realm, const String& password);