Fix empty domain handling in ResponseCookie

This commit also updates its test to use its intended inputs.
This commit is contained in:
Johnny Lim
2020-03-25 08:18:03 +00:00
committed by Rossen Stoyanchev
parent c24fa22a1b
commit 0f50a9a60a
2 changed files with 2 additions and 2 deletions
@@ -86,7 +86,7 @@ public class ResponseCookieTests {
Arrays.asList("\"\"", "\t\"\" ", " \" \t \"\t")
.forEach(domain -> {
ResponseCookie cookie = ResponseCookie.fromClientResponse("id", "1fWa").domain("\"\"").build();
ResponseCookie cookie = ResponseCookie.fromClientResponse("id", "1fWa").domain(domain).build();
assertThat(cookie.getDomain()).isNull();
});