avoid another redirect

This commit is contained in:
Mathieu Carbou
2024-09-02 18:11:53 +02:00
parent 71c0fa7a0c
commit e9583133ee

View File

@@ -372,11 +372,11 @@ class AsyncWebServerRequest {
[[deprecated("Replaced by beginResponse(...)")]] [[deprecated("Replaced by beginResponse(...)")]]
AsyncWebServerResponse* beginResponse_P(int code, const String& contentType, const uint8_t* content, size_t len, AwsTemplateProcessor callback = nullptr) { AsyncWebServerResponse* beginResponse_P(int code, const String& contentType, const uint8_t* content, size_t len, AwsTemplateProcessor callback = nullptr) {
return beginResponse(code, contentType, content, len, callback); return beginResponse(code, contentType.c_str(), content, len, callback);
} }
[[deprecated("Replaced by beginResponse(...)")]] [[deprecated("Replaced by beginResponse(...)")]]
AsyncWebServerResponse* beginResponse_P(int code, const String& contentType, PGM_P content, AwsTemplateProcessor callback = nullptr) { AsyncWebServerResponse* beginResponse_P(int code, const String& contentType, PGM_P content, AwsTemplateProcessor callback = nullptr) {
return beginResponse(code, contentType, content, callback); return beginResponse(code, contentType.c_str(), content, callback);
} }
#ifdef ESP8266 #ifdef ESP8266