Fix Cookie parsing when there are multiple cookies

This commit is contained in:
Aurora Lahtela 2022-09-25 15:28:20 +03:00
parent 49549a3233
commit ff4187341a
2 changed files with 9 additions and 1 deletions

View File

@ -41,4 +41,12 @@ public class Cookie {
public String getValue() {
return value;
}
@Override
public String toString() {
return "Cookie{" +
"'" + name + '\'' +
"='" + value + '\'' +
'}';
}
}

View File

@ -111,7 +111,7 @@ public class JettyInternalRequest implements InternalRequest {
if (!textCookies.isEmpty()) {
String[] separated = new TextStringBuilder().appendWithSeparators(textCookies, ";").build().split(";");
for (String textCookie : separated) {
cookies.add(new Cookie(textCookie));
cookies.add(new Cookie(textCookie.trim()));
}
}
return cookies;