Fix empty domain handling in ResponseCookie
This commit also updates its test to use its intended inputs.
This commit is contained in:
committed by
Rossen Stoyanchev
parent
c24fa22a1b
commit
0f50a9a60a
@@ -248,7 +248,7 @@ public final class ResponseCookie extends HttpCookie {
|
||||
if (lenient && !StringUtils.isEmpty(domain)) {
|
||||
String s = domain.trim();
|
||||
if (s.startsWith("\"") && s.endsWith("\"")) {
|
||||
if (s.substring(1, domain.length() - 1).trim().isEmpty()) {
|
||||
if (s.substring(1, s.length() - 1).trim().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user