Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6dfcdef

Browse files
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

‎libraries/HTTPClient/src/HTTPClient.cpp

Lines changed: 2 additions & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /