260806_01_ENH: multipart 데이터 ascii -> utf-8로 변경

This commit is contained in:
2026-08-06 11:13:29 +09:00
parent 1ac8dab45a
commit 0d9f1ff196
4 changed files with 18 additions and 12 deletions

View File

@@ -178,7 +178,7 @@ ExternalApiResponse res = client.post(url, headers, jsonBody);
```java
List<ExternalApiMultipartPart> parts = List.of(
ExternalApiMultipartPart.formField("serviceCode", "demo"),
ExternalApiMultipartPart.file("file", "sample.txt", "text/plain", fileBytes)
ExternalApiMultipartPart.file("file", "한글-파일.txt", "text/plain", fileBytes)
);
ExternalApiResponse res = client.postMultipart(url, headers, parts);
@@ -186,6 +186,8 @@ ExternalApiResponse res = client.postMultipart(url, headers, parts);
multipart 요청에서는 전달한 headers의 `Content-Type` 값을 무시하고, 필요한 boundary를 포함한
`Content-Type: multipart/form-data; boundary=...` 값을 자동 생성합니다.
multipart 파트 헤더와 텍스트 필드는 UTF-8로 인코딩하므로 한글 등 non-ASCII
파일명을 `filename="한글-파일.txt"` 형태로 손실 없이 전송합니다.
지원 메서드:
@@ -763,4 +765,5 @@ Endpoint:
## 변경 이력
- 2026-08-06: multipart 파트 헤더를 UTF-8로 인코딩하여 한글 등 non-ASCII 파일명 전송을 지원합니다.
- 2026-08-04: `kri.auth.apikey.allowed-paths`와 `kri.auth.apikey.excluded-paths`를 추가했습니다. 미설정·`null`·빈 목록은 기존 전역 API Key 인증 동작을 유지하며, 제외 패턴은 허용 패턴보다 우선합니다.