-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[톰캣 구현하기 1, 2단계] 조이썬(이영수) 미션 제출합니다. (#506)
* fix: remove implementation logback-classic on gradle (#501) * fix: add threads min-spare configuration on properties (#502) * feat: Http Method 구현 * feat: Http Path 구현 * feat: Http QueryParams 구현 * feat: Http RequestLine 구현 * feat: Http Headers 구현 * feat: Http Request 구현 * feat: 파일 읽는 ResourcesReader 구현 * feat: Http Response 구현 * feat: Http 11 Process 구현 * chore: 충돌 해결 * feat: 헤더 포멧 메시지 내 공백 추가 * 1단계 완료 * refactor: 파일 패키지로 이동 * feat: 정적 메소드로 변경 * feat: 로그인 기능 구현 * feat: 리소스 조회 Executor 구현 * feat: Http Cookie 구현 * feat: Http Body 구현 * refactor: 함수명 변경 * feat: Http Session 구현 * feat: 쿠기 추가하는 기능 구현 * feat: Request 내 Body,Cookies,Session 추가 * feat: Process 내 Session 받아오는 기능 추가 * feat: GET 요청 분리 및 구현 * feat: POST 요청 구현, Redirect 구현 * 2단계 완료 * refactor: 전체적인 코드 검사, 상수화 * refactor: 피드백 반영 * feat: 세션 만료 기능 구현 * feat: 만료된 세션 정리하는 기능 구현 * feat: 프로세서 내 세션 정리 기능 추가 --------- Co-authored-by: Gyeongho Yang <[email protected]>
- Loading branch information
1 parent
0b698a2
commit 187717f
Showing
63 changed files
with
1,590 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ server: | |
accept-count: 1 | ||
max-connections: 1 | ||
threads: | ||
min-spare: 2 | ||
max: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tomcat/src/main/java/com/techcourse/executor/LoginGetExecutor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.techcourse.executor; | ||
|
||
import org.apache.coyote.file.ResourcesReader; | ||
import org.apache.coyote.http11.executor.Executor; | ||
import org.apache.coyote.http11.HttpStatusCode; | ||
import org.apache.coyote.http11.path.Path; | ||
import org.apache.coyote.http11.ResourceToResponseConverter; | ||
import org.apache.coyote.http11.method.HttpMethod; | ||
import org.apache.coyote.http11.request.HttpRequest; | ||
import org.apache.coyote.http11.response.HttpResponse; | ||
|
||
public class LoginGetExecutor implements Executor { | ||
@Override | ||
public HttpResponse execute(final HttpRequest request) { | ||
return ResourceToResponseConverter.convert(HttpStatusCode.OK, ResourcesReader.read(Path.from("login.html"))); | ||
} | ||
|
||
@Override | ||
public boolean isMatch(final HttpRequest request) { | ||
return request.getMethod() == HttpMethod.GET && request.getPath() | ||
.equals("/login"); | ||
} | ||
} |
Oops, something went wrong.