-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[톰캣 구현하기 - 1,2단계] 오잉(이하늘) 미션 제출합니다. #341
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안녕하세요 오잉 코드 정말 잘 봤습니다 !
객체의 책임에 따른 분리가 되게 깔끔하네요 !
특히 Request
클래스내의 책임분리가 돋보여요..!
코드를 보면서 많이 배웠습니다 ㅎㅎ
개별 코드에 관련된 커멘트는 각각 남겨놨습니다 !
차이점을 묻는 질문 같은거는 답변 안달아도 괜찮습니다. 코드 읽다가 저도 궁금해서 찾아보려고 질문한것도 몇개있어서요 ㅋㅋ
다음 리퀘스트 때 머지 하겠습니다 ! 커멘트 보시고 각자 생각하는 중요도의 차이가 있으니 반영은 자유롭게 해주시면 도리 것 같아요 !
고생하셨습니다 ~~
tomcat/src/main/java/org/apache/coyote/http11/Http11Processor.java
Outdated
Show resolved
Hide resolved
tomcat/src/main/java/org/apache/coyote/http11/common/request/HttpRequest.java
Outdated
Show resolved
Hide resolved
tomcat/src/main/java/org/apache/coyote/http11/common/request/HttpRequest.java
Outdated
Show resolved
Hide resolved
tomcat/src/main/java/org/apache/coyote/http11/common/request/HttpRequest.java
Outdated
Show resolved
Hide resolved
tomcat/src/main/java/org/apache/coyote/http11/handler/LoginHandler.java
Outdated
Show resolved
Hide resolved
tomcat/src/main/java/org/apache/coyote/http11/common/request/StartLine.java
Outdated
Show resolved
Hide resolved
tomcat/src/main/java/org/apache/coyote/http11/handler/RegisterHandler.java
Outdated
Show resolved
Hide resolved
(대신 null 방지 위해 .getOrDefault()사용)
SonarCloud Quality Gate failed. 1 Bug 0.0% Coverage The version of Java (11.0.20.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오잉 코드 잘봤습니다..!
진짜 코드 너무너무 깔끔해서 읽으면서 박수쳤습니다.
몇개 커멘트 남겼으니 확인 부탁드려요 !
이번단계는 머지하겠씀다 고생하셨어요 ~
return HttpResponse.createMethodNotAllowed(List.of(HttpMethod.GET, HttpMethod.POST)); | ||
} | ||
|
||
private static HttpResponse doGet() throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static method인 이유가 있을까요 ? 밑에도 마찬가지입니다 !
try { | ||
return valueOf(name); | ||
} catch (IllegalArgumentException e) { | ||
return NONE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WOW ! 배우고갑니다
HttpHeaders headers = new HttpHeaders(); | ||
headers.addHeader(HttpHeaderName.LOCATION, Page.UNAUTHORIZED.getUri()); | ||
return HttpResponse.create(StatusCode.FOUND, headers); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 여기서 2가지 방법이 있다고 생각했는데용
Unauthorized
상태코드를 쓰면서body
에Unauthorized
전용 예외페이지를 넣는다.Found
상태코드를 쓰면서Location
헤더에Unauthorized
페이지 접근 uri를 넣는다.
궁금해서 여쭤봅니다. 2번을 쓰신 이유가 있을까용 ? (궁금궁금)
안뇽하세요 하디씨?!
제가 리뷰어인줄 알았는데 하디가 리뷰어였군요 😋
이번 미션 참 쉽지 않았는데요...
리팩토링 갈 길이 멀어 보입니다..^^
제가 구현한 로직은 다음과 같습니다!