Skip to content

Commit 6dfcdef

Browse files
authored
HTTPClient - Fix case sensitiveness for header keys (#8632)
1 parent b65d1c7 commit 6dfcdef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: libraries/HTTPClient/src/HTTPClient.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ void HTTPClient::collectHeaders(const char* headerKeys[], const size_t headerKey
10811081
String HTTPClient::header(const char* name)
10821082
{
10831083
for(size_t i = 0; i < _headerKeysCount; ++i) {
1084-
if(_currentHeaders[i].key == name) {
1084+
if(_currentHeaders[i].key.equalsIgnoreCase(name)) {
10851085
return _currentHeaders[i].value;
10861086
}
10871087
}
@@ -1112,7 +1112,7 @@ int HTTPClient::headers()
11121112
bool HTTPClient::hasHeader(const char* name)
11131113
{
11141114
for(size_t i = 0; i < _headerKeysCount; ++i) {
1115-
if((_currentHeaders[i].key == name) && (_currentHeaders[i].value.length() > 0)) {
1115+
if((_currentHeaders[i].key.equalsIgnoreCase(name)) && (_currentHeaders[i].value.length() > 0)) {
11161116
return true;
11171117
}
11181118
}

0 commit comments

Comments
 (0)