Fixes Cookie Case Sensitivity (#7112)
Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
This commit is contained in:
parent
d9ac65f291
commit
fe1d9e00d5
1 changed files with 3 additions and 2 deletions
|
|
@ -1551,8 +1551,6 @@ void HTTPClient::setCookie(String date, String headerValue)
|
||||||
String value;
|
String value;
|
||||||
int pos1, pos2;
|
int pos1, pos2;
|
||||||
|
|
||||||
headerValue.toLowerCase();
|
|
||||||
|
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
strptime(date.c_str(), HTTP_TIME_PATTERN, &tm);
|
strptime(date.c_str(), HTTP_TIME_PATTERN, &tm);
|
||||||
cookie.date = mktime(&tm);
|
cookie.date = mktime(&tm);
|
||||||
|
|
@ -1567,6 +1565,9 @@ void HTTPClient::setCookie(String date, String headerValue)
|
||||||
return; // invalid cookie header
|
return; // invalid cookie header
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// only Cookie Attributes are case insensitive from this point on
|
||||||
|
headerValue.toLowerCase();
|
||||||
|
|
||||||
// expires
|
// expires
|
||||||
if (headerValue.indexOf("expires=") >= 0){
|
if (headerValue.indexOf("expires=") >= 0){
|
||||||
pos1 = headerValue.indexOf("expires=") + strlen("expires=");
|
pos1 = headerValue.indexOf("expires=") + strlen("expires=");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue