@@ -312,14 +312,15 @@ void HandleAndroidConnectivityCheck(class AsyncWebServerRequest* request)
312312// -----
313313// MIME type string constants
314314
315- static const char PROGMEM textJavaScriptStr[] = " text/javascript" ;
316- static const char PROGMEM textCssStr[] = " text/css" ;
317- static const char PROGMEM fontWoffStr[] = " font/woff" ;
315+ static const char textHtmlStr[] = " text/html" ;
316+ static const char textJavaScriptStr[] = " text/javascript" ;
317+ static const char textCssStr[] = " text/css" ;
318+ static const char fontWoffStr[] = " font/woff" ;
318319
319320// Convert the file extension to the MIME type
320321const char * getContentType (const String& path)
321322{
322- if (path.endsWith (" .html" )) return " text/html " ;
323+ if (path.endsWith (" .html" )) return textHtmlStr ;
323324 if (path.endsWith (" .woff" )) return fontWoffStr;
324325 if (path.endsWith (" .css" )) return textCssStr;
325326 if (path.endsWith (" .js" )) return textJavaScriptStr;
@@ -430,9 +431,9 @@ void HandleNotFound(class AsyncWebServerRequest* request)
430431void HandleLowMemory (class AsyncWebServerRequest * request)
431432{
432433 #if defined USE_OLD_ESP_ASYNC_WEB_SERVER || defined ESP8266
433- AsyncWebServerResponse* response = request->beginResponse_P (429 , F ( " text/html " ) ,
434+ AsyncWebServerResponse* response = request->beginResponse_P (429 , textHtmlStr ,
434435 #else
435- AsyncWebServerResponse* response = request->beginResponse (429 , F ( " text/html " ) ,
436+ AsyncWebServerResponse* response = request->beginResponse (429 , textHtmlStr ,
436437 #endif
437438 PSTR (
438439 " <html>"
@@ -646,7 +647,7 @@ void ServeMainHtml(class AsyncWebServerRequest* request)
646647 #else
647648
648649 // Serve from program memory, so updating is easy and does not need the flash file system uploader
649- ServeDocument (request, PSTR ( " text/html " ) , mfd_html);
650+ ServeDocument (request, textHtmlStr , mfd_html);
650651
651652 #endif // SERVE_MAIN_FILES_FROM_FFS
652653} // ServeMainHtml
0 commit comments