From e9583133ee2755a80787109016cfba08e996e1c3 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Mon, 2 Sep 2024 18:11:53 +0200 Subject: [PATCH] avoid another redirect --- src/ESPAsyncWebServer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ESPAsyncWebServer.h b/src/ESPAsyncWebServer.h index d0790d5..2d1f100 100644 --- a/src/ESPAsyncWebServer.h +++ b/src/ESPAsyncWebServer.h @@ -372,11 +372,11 @@ class AsyncWebServerRequest { [[deprecated("Replaced by beginResponse(...)")]] 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(...)")]] 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