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

Appearance settings

Commit 6dfcdef

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

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎libraries/HTTPClient/src/HTTPClient.cpp

Copy file name to clipboardExpand all lines: libraries/HTTPClient/src/HTTPClient.cpp
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.