Skip to content

Commit 3260830

Browse files
authored
webserver: fix sending char* (esp8266#6878)
* webserver: fix sending char* * add missing char* overload
1 parent ee24cff commit 3260830

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libraries/ESP8266WebServer/src/ESP8266WebServer.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ class ESP8266WebServerTemplate
127127
void send(int code, const char* content_type = NULL, const String& content = String(""));
128128
void send(int code, char* content_type, const String& content);
129129
void send(int code, const String& content_type, const String& content);
130-
void send(int code, const char *content_type, const char *content, size_t content_length = 0) {
131-
if (content_length == 0) {
132-
content_length = strlen_P(content);
133-
}
130+
void send(int code, const char *content_type, const char *content) {
131+
send_P(code, content_type, content);
132+
}
133+
void send(int code, const char *content_type, const char *content, size_t content_length) {
134134
send_P(code, content_type, content, content_length);
135135
}
136136
void send(int code, const char *content_type, const uint8_t *content, size_t content_length) {

0 commit comments

Comments
 (0)