<aside> 💡 상세 원인
GET은 response header를 주면 정상적으로 빈 페이지와 200을 응답 받는다.
POST는 response header를 GET과 동일하게 줘도 응답을 못받고 대기 중 상태다.
이유가 무엇인지?
</aside>

POST로 요청을 2번 보내야지 body를 받을 수가 있는 이슈가 있음
첫 요청을 보낼 때 body가 비어 있음, 대기 중이라 그런건가?
사용자가 연결을 끊어야지 그 다음으로 넘어가는데 ?
서버에서 요청 바디를 읽는 부분이 잘못되었을 수 있습니다. readLine() 메서드는 빈 줄(-1) 을 만날 때까지 읽기 때문에, 요청 바디가 여러 줄로 되어 있는 경우 문제가 발생할 수 있습니다.
if(request[0].equals("GET") && request[1].contains("?")) {
requestBody = request[1].split("\\?")[1];
} else if(request[0].equals("POST")) {
// Content-Length 헤더를 통해 본문의 길이를 파악 ****
String contentLengthValue = header.get("Content-Length");
if (contentLengthValue != null) {
int contentLength = Integer.parseInt(contentLengthValue);
char[] body = new char[contentLength];
bufferedReader.read(body, 0, contentLength);
requestBody = new String(body);
}
}
bufferedReader.readLine()으로만 body를 받아서 생긴 오류