Skip to content

Commit 7a3426f

Browse files
committed
Add deprecated wrapper/forwarder for _collectHeader
1 parent 233dad0 commit 7a3426f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

libraries/ESP8266WebServer/src/ESP8266WebServer.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ class ESP8266WebServerTemplate
204204
void _uploadWriteByte(uint8_t b);
205205
uint8_t _uploadReadByte(ClientType& client);
206206
void _prepareHeader(String& response, int code, const char* content_type, size_t contentLength);
207-
bool _collectHeader(const char* headerName, const char* headerValue);
207+
bool _collectHeader(const char* headerName, const char* headerValue) __attribute__((deprecated));
208+
bool _collectHeader(const String& headerName, const String& headerValue);
208209

209210
void _streamFileCore(const size_t fileSize, const String & fileName, const String & contentType);
210211

libraries/ESP8266WebServer/src/Parsing-impl.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,11 @@ bool ESP8266WebServerTemplate<ServerType>::_parseRequest(ClientType& client) {
229229
return true;
230230
}
231231

232+
template <typename ServerType>
233+
bool ESP8266WebServerTemplate<ServerType>::_collectHeader(const char* headerName, const char* headerValue) {
234+
return _collectHeader(String(headerName), String(headerValue));
235+
}
236+
232237
template <typename ServerType>
233238
bool ESP8266WebServerTemplate<ServerType>::_collectHeader(const String& headerName, const String& headerValue) {
234239
for (int i = 0; i < _headerKeysCount; i++) {

0 commit comments

Comments
 (0)