add favicon
This commit is contained in:
@@ -413,6 +413,15 @@ void WebServer::send(int code, const char* content_type, const String& content)
|
||||
sendContent(content);
|
||||
}
|
||||
|
||||
void WebServer::send(int code, const char *content_type, const char *content, size_t contentLength)
|
||||
{
|
||||
String header;
|
||||
_prepareHeader(header, code, content_type, contentLength);
|
||||
_currentClientWrite(header.c_str(), header.length());
|
||||
if(contentLength)
|
||||
sendContent(content, contentLength);
|
||||
}
|
||||
|
||||
void WebServer::send_P(int code, PGM_P content_type, PGM_P content) {
|
||||
size_t contentLength = 0;
|
||||
|
||||
@@ -429,6 +438,7 @@ void WebServer::send_P(int code, PGM_P content_type, PGM_P content) {
|
||||
}
|
||||
|
||||
void WebServer::send_P(int code, PGM_P content_type, PGM_P content, size_t contentLength) {
|
||||
_chunked = true;
|
||||
String header;
|
||||
char type[64];
|
||||
memccpy_P((void*)type, (PGM_VOID_P)content_type, 0, sizeof(type));
|
||||
|
||||
@@ -119,6 +119,7 @@ public:
|
||||
// content_type - HTTP content type, like "text/plain" or "image/png"
|
||||
// content - actual content body
|
||||
void send(int code, const char* content_type = NULL, const String& content = String(""));
|
||||
void send(int code, const char* content_type, const char* content, size_t contentLength);
|
||||
void send(int code, char* content_type, const String& content);
|
||||
void send(int code, const String& content_type, const String& content);
|
||||
void send_P(int code, PGM_P content_type, PGM_P content);
|
||||
|
||||
Reference in New Issue
Block a user