From 5dc340a3aaeb371a4c8c686404814bd1b7cd9a4b Mon Sep 17 00:00:00 2001 From: mmame Date: Thu, 20 Jul 2023 09:27:12 +0200 Subject: [PATCH] AsyncAbstractResponse: mark member _head protected This allows implementors more flexibility. i.e. override _respond() method. e.g. see https://gist.github.com/mmame/f4c8c095197dbc15c7ccf033a8a1f895 --- src/WebResponseImpl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WebResponseImpl.h b/src/WebResponseImpl.h index 9a64e3a52..d9eafc19b 100644 --- a/src/WebResponseImpl.h +++ b/src/WebResponseImpl.h @@ -41,7 +41,6 @@ class AsyncBasicResponse: public AsyncWebServerResponse { class AsyncAbstractResponse: public AsyncWebServerResponse { private: - String _head; // Data is inserted into cache at begin(). // This is inefficient with vector, but if we use some other container, // we won't be able to access it as contiguous array of bytes when reading from it, @@ -50,6 +49,7 @@ class AsyncAbstractResponse: public AsyncWebServerResponse { size_t _readDataFromCacheOrContent(uint8_t* data, const size_t len); size_t _fillBufferAndProcessTemplates(uint8_t* buf, size_t maxLen); protected: + String _head; AwsTemplateProcessor _callback; public: AsyncAbstractResponse(AwsTemplateProcessor callback=nullptr);