Skip to content

HTTP 웹 서버 1단계 - 구현 #32

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

Merged
merged 11 commits into from
Sep 28, 2018

Conversation

david-learner
Copy link

  • 오랜만에 온갖 해악을 저지른 코드를 짜보았습니다

  • HttpMessage의 구조

    • Request/Response Line
    • Headers
    • Body
  • 윈도우에서 8080 포트 사용중인 프로세스ID 찾는 명령
    netstat -ano | grep 8080

  • set-cookie는 응답 200일 때 하는 것이지만, 302(redirect)일 때 set-cookie를 지원한다.

    • IE8 또는 그 이전 버전을 제외한 나머지 브라우저는 대부분 지원
  • 302(redirect)일 때, set-cookie를 해주는 이유는?
    로그인 요청을 받은 뒤, 정상적인 아이디, 패스워드라서 응답으로 set-cookie와 redirect를 해주고 싶었지만, 200에서는 redirect 하는 방법을 찾기 못했다.
    따라서 302에서 set-cookie하는 방법을 찾게 되었다.
    다만, 200에서도 응답의 body에 이동하고자 하는 페이지를 담아주면 되지만, 이동한 page url은 표시되지 않고 그 전 페이지의 url이 주소표시줄에 남아있는다.
    그리고 다음 요청부터는 남아있는 url을 기준으로 요청이 진행된다. (referer 관련 문제 같지만 확인하지 못했습니다)

  • 깨달은 점

    • spring boot의 spring mvc에서 추상화를 통해 굉장히 많은 것을 편하게 제공한다는 것을 몸소 느꼈습니다.
    • 이론과 약간의 코딩으로 어렴풋 알고 있던 웹서버의 동작을 조금씩 알아가게 됬습니다.

@javajigi javajigi merged commit 6a6294e into code-squad:david-learner Sep 28, 2018
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.

2 participants