feature: Content-Type charset 기반 인바운드/아웃바운드 인코딩 처리

This commit is contained in:
curry772
2026-04-07 10:15:41 +09:00
parent e21f134c11
commit 42cbafd67d
3 changed files with 31 additions and 2 deletions
@@ -242,7 +242,17 @@ public class DJErpApiAdapterService extends HttpAdapterServiceSupport {
byte[] data = new byte[bb.position()];
bb.position(0);
bb.get(data);
paramValue = new String(data, encode);
String bodyEncode = encode;
String contentTypeHeader = request.getContentType();
if (StringUtils.isNotBlank(contentTypeHeader)) {
try {
MediaType mediaType = MediaType.parseMediaType(contentTypeHeader);
if (mediaType.getCharset() != null) {
bodyEncode = mediaType.getCharset().name();
}
} catch (Exception ignored) {}
}
paramValue = new String(data, bodyEncode);
if (traceLevel >= 3) {
HttpMemoryLogger.txlog(adptGrpName + adptName,