Skip to content

fix : 인코딩 경로 변경#48

Merged
oroi2009 merged 1 commit into
mainfrom
fix/#11
May 12, 2026
Merged

fix : 인코딩 경로 변경#48
oroi2009 merged 1 commit into
mainfrom
fix/#11

Conversation

@oroi2009

@oroi2009 oroi2009 commented May 12, 2026

Copy link
Copy Markdown
Contributor

🔍 관련 이슈


✅ 작업 분류

  • 버그 수정
  • 신규 기능
  • 프로젝트 구조 변경
  • 코드 리팩토링
  • 기능 수정

✨ 작업 내용

  • 인코딩 경로 변경

👥 전달사항

  • 서버가 구식 aesgcm 인코딩 경로로 보내면서 Crypto-Key 헤더를 생성 -> Push Service가 해당 헤더 형식을 거부하는 문제 발생
    기존 라이브러리의 동기 send(notification) 기본값이 AESGCM이라서 발생한 것으로 추정.
    -> 현대 표준 AES128GCM으로 수정

✅ 체크리스트

  • 코드가 컴파일 및 빌드됨
  • 모든 테스트가 통과함
  • 관련 문서가 업데이트됨
  • 커밋 메시지를 확인함

📸 스크린샷


💡 배운 것 / 시도한 것 / 고민한 점

@oroi2009 oroi2009 self-assigned this May 12, 2026
@oroi2009 oroi2009 merged commit 0363ab9 into main May 12, 2026
2 checks passed

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the WebPushSender service to explicitly use AES128GCM encoding when sending notifications. A review comment identifies a potential resource leak where the HttpResponse entity is not consumed on successful requests, which could lead to connection pool exhaustion.

);

HttpResponse response = pushService.send(notification);
HttpResponse response = pushService.send(notification, Encoding.AES128GCM);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

HttpResponse를 사용하는 경우, 성공 응답(2xx) 시에도 응답 엔티티(Entity)를 소비하지 않으면 커넥션 풀의 커넥션이 해제되지 않아 누수가 발생할 수 있습니다. 현재 코드에서는 에러 발생 시(else 블록)에만 readResponseBody를 통해 엔티티를 소비하고 있습니다. 성공 시에도 EntityUtils.consume(response.getEntity())를 호출하여 커넥션을 명시적으로 반환하는 로직을 추가하는 것이 좋습니다.

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