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

feat: Handle chunked request(#13) #33

Merged
merged 1 commit into from
Oct 14, 2022
Merged

Conversation

hhkim0729
Copy link
Collaborator

작업 내용

리뷰어에게

많은 변화가.... 커밋 메시지 참고 요망

Additional tasks
- Change Request param of constructor(header)
- Add setBody() in Request class
- Add 501 not implemented exception
- Add hexStringToNumber() util
- Separate method handling logic to member functions
- Fix issue when request message is bigger than buffer size

Co-authored-by: srngch <srngch.dev@gmail.com>
@hhkim0729 hhkim0729 added bug Something isn't working feature New feature or request refactor labels Oct 13, 2022
@hhkim0729 hhkim0729 requested a review from S0YKIM October 13, 2022 12:41
std::map<std::string, std::string>::iterator it = headers_.find(fieldName);
if (it == headers_.end())
throw std::invalid_argument("Field name " + fieldName + " does not exist");
return std::string("");
Copy link
Collaborator

Choose a reason for hiding this comment

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

왜 예외를 던지지 않고 빈 문자열을 반환하도록 변경되었나요?

Copy link
Collaborator Author

@hhkim0729 hhkim0729 Oct 14, 2022

Choose a reason for hiding this comment

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

어차피 클라이언트에서 헤더 필드만 보내고 밸류가 없는 것도 잘못된 헤더였기 때문에
헤더가 없는 경우 + 헤더의 밸류가 없는 경우 모두 같은 것으로 취급하기로 했습니다~!
👉 이 함수를 사용하는 곳에서 예외처리를 해야 하는 수고를 더는 효과를 얻었습니다~~

@hhkim0729 hhkim0729 merged commit 0af9504 into develop Oct 14, 2022
@hhkim0729 hhkim0729 deleted the feature/13/chunked-request branch October 14, 2022 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature New feature or request refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle chunked request messages
3 participants