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

webserver: fix sending char* (#6878)

* webserver: fix sending char*

* add missing char*  overload
This commit is contained in:
david gauchard 2019-12-04 00:51:51 +01:00 committed by GitHub
parent ee24cffc5a
commit 326083044a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,10 +127,10 @@ public:
void send(int code, const char* content_type = NULL, const String& content = String("")); void send(int code, const char* content_type = NULL, const String& content = String(""));
void send(int code, char* content_type, const String& content); void send(int code, char* content_type, const String& content);
void send(int code, const String& content_type, const String& content); void send(int code, const String& content_type, const String& content);
void send(int code, const char *content_type, const char *content, size_t content_length = 0) { void send(int code, const char *content_type, const char *content) {
if (content_length == 0) { send_P(code, content_type, content);
content_length = strlen_P(content); }
} void send(int code, const char *content_type, const char *content, size_t content_length) {
send_P(code, content_type, content, content_length); send_P(code, content_type, content, content_length);
} }
void send(int code, const char *content_type, const uint8_t *content, size_t content_length) { void send(int code, const char *content_type, const uint8_t *content, size_t content_length) {