Skip to content

Commit

Permalink
fix: 쿠키 조회 로직 변경 (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
Choi-JJunho authored and hozzijeong committed Oct 20, 2023
1 parent 7d6534a commit a10fa4f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class HttpCookieManager {
private static final int VALUE_INDEX = 1;
private static final int COOKIE_SIZE = 2;
private static final String SESSION_DELIMITER = "=";
private static final String SESSIONS_DELIMITER = ";";
private static final String SESSIONS_DELIMITER = "; ";

private final Map<String, String> cookies = new HashMap<>();

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ class HttpCookieManagerTest {

@Test
void JSESSIONID를_가져온다() {
String requestCookie = "JSESSIONID=F51D50B1C12CE2BC58C6AC6EF8EF0092; _ga_8SL2D547VW=GS1.1.1697719895.1.1.1697720060.0.0.0";
String requestCookie = "_ga_8SL2D547VW=GS1.1.1697719895.1.1.1697720060.0.0.0; JSESSIONID=F51D50B1C12CE2BC58C6AC6EF8EF0092";
HttpCookieManager httpCookieManager = new HttpCookieManager(requestCookie);

String jsessionid = httpCookieManager.getCookie("JSESSIONID");

assertThat(jsessionid).isEqualTo("F51D50B1C12CE2BC58C6AC6EF8EF0092");
}

@Test
void JSESSIONID를_가져온다2() {
String requestCookie = "JSESSIONID=F51D50B1C12CE2BC58C6AC6EF8EF0092";
HttpCookieManager httpCookieManager = new HttpCookieManager(requestCookie);

String jsessionid = httpCookieManager.getCookie("JSESSIONID");
Expand Down

0 comments on commit a10fa4f

Please sign in to comment.