Skip to content
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

[유안] 3단계 - HTTP 웹 서버 구현 미션 제출합니다. #205

Open
wants to merge 8 commits into
base: kimseonggyu1
Choose a base branch
from

Conversation

KimSeongGyu1
Copy link

범블비와 페어로 진행 후 제출을 잊고 있었습니다 죄송합니다
범블비의 pr과 완전히 동일합니다
그동안 했던 것 처럼 범블비 pr에 남기신 리뷰를 참고해서 같이 진행해도 될까요?

Copy link

@dave915 dave915 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

유안 안녕하세요! 말씀주신대로 범블비 피드백과 함께 진행해도 됩니다 :)
그래도 일단 범블비에게 단 피드백 동일 하게 달아 놓았어요!

Comment on lines +24 to +26
public void invalidate() {
attributes.clear();
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

session의 invalidate 메소드가 호출된 후에는 해당 세션은 사용하지 못하는 것으로 알고 있어요.
아래 링크 한번 읽어보시고, 한번 검색해보시면 좋을 것 같아요 :)

https://love2taeyeon.tistory.com/entry/invalidate%EC%9D%80-%EC%84%B8%EC%85%98%EC%9D%84-%EC%86%8C%EB%A9%B8%EC%8B%9C%ED%82%A4%EB%8A%94-%EA%B2%83%EC%9D%B4-%EC%95%84%EB%8B%88%EB%9D%BC-%EB%AC%B4%ED%9A%A8%ED%99%94-%EC%8B%9C%ED%82%AC%EB%BF%90%EC%9D%B4%EB%8B%A4

import java.util.stream.Stream;

public class HttpSessionStorage {
private static Map<UUID, HttpSession> sessions = new HashMap<>();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sessions 에는 여러 Request Thread가 동시에 접근 가능하기 때문에
HashMap 보단 ConcurrentHashMap 이 Thread Safe 할 것 같아요 :)

import java.util.Arrays;
import java.util.List;

public class AuthFilter implements Filter {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter로 처리한 점 👏👏👏👏👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants