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

Adjust send_P to function the same as send (#5507)

This commit is contained in:
dav1901 2019-02-07 22:39:20 +02:00 committed by Earle F. Philhower, III
parent 29bb7fc4c1
commit c08efb52fb

View File

@ -419,7 +419,9 @@ void ESP8266WebServer::send_P(int code, PGM_P content_type, PGM_P content) {
memccpy_P((void*)type, (PGM_VOID_P)content_type, 0, sizeof(type)); memccpy_P((void*)type, (PGM_VOID_P)content_type, 0, sizeof(type));
_prepareHeader(header, code, (const char* )type, contentLength); _prepareHeader(header, code, (const char* )type, contentLength);
_currentClientWrite(header.c_str(), header.length()); _currentClientWrite(header.c_str(), header.length());
sendContent_P(content); if (contentLength) {
sendContent_P(content);
}
} }
void ESP8266WebServer::send_P(int code, PGM_P content_type, PGM_P content, size_t contentLength) { void ESP8266WebServer::send_P(int code, PGM_P content_type, PGM_P content, size_t contentLength) {