未验证 提交 fe1d9e00 编写于 作者: R Rodrigo Garcia 提交者: GitHub

Fixes Cookie Case Sensitivity (#7112)

Co-authored-by: NJan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
上级 d9ac65f2
......@@ -1551,8 +1551,6 @@ void HTTPClient::setCookie(String date, String headerValue)
String value;
int pos1, pos2;
headerValue.toLowerCase();
struct tm tm;
strptime(date.c_str(), HTTP_TIME_PATTERN, &tm);
cookie.date = mktime(&tm);
......@@ -1567,6 +1565,9 @@ void HTTPClient::setCookie(String date, String headerValue)
return; // invalid cookie header
}
// only Cookie Attributes are case insensitive from this point on
headerValue.toLowerCase();
// expires
if (headerValue.indexOf("expires=") >= 0){
pos1 = headerValue.indexOf("expires=") + strlen("expires=");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册