Skip to content

[Refactor] HttpHeader enum 전환 및 HttpResponseHeader 도입#5

Merged
ksmail13 merged 2 commits into
masterfrom
header
Mar 13, 2026
Merged

[Refactor] HttpHeader enum 전환 및 HttpResponseHeader 도입#5
ksmail13 merged 2 commits into
masterfrom
header

Conversation

@ksmail13

Copy link
Copy Markdown
Owner

HttpHeader를 enum으로 변경하고 HttpResponseHeader를 통해 헤더 관리 방식을 개선했습니다.

주요 변경 사항:

  • HttpHeader를 enum으로 변경하여 키 타입(Static Str, String)에 따른 유연성 확보
  • ToString 트레이트를 ToStr로 변경하여 불필요한 Rc 할당 제거
  • HttpResponseHeader 도입으로 사전 정의된 헤더와 커스텀 헤더를 효율적으로 관리
  • HttpResponse의 헤더 쓰기 로직 최적화 및 간소화

- HttpHeader를 struct에서 enum(StrKey, StringKey)으로 전환하여 유연성 확보
- HttpResponse의 HashMap 기반 헤더 관리를 성능 최적화된 HttpResponseHeader로 대체
- set_header 시 참조 대신 소유권을 넘기도록 변경하여 불필요한 복사 방지
- cleanup unused functions
- ToString to ToStr and return &str
- refactoring response the response header
@ksmail13 ksmail13 merged commit 514d2eb into master Mar 13, 2026
1 check passed
@ksmail13 ksmail13 deleted the header branch March 13, 2026 15:24
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.

1 participant