From 1d61d0270bcdf958a4aabc19484d0e2348c34b5b Mon Sep 17 00:00:00 2001 From: eckrin Date: Thu, 22 Aug 2024 16:22:39 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B9=85=20=EC=A1=B0=EA=B1=B4?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - multipart/form-data에서 part에 Content-Type 지정하는 경우는 파일에 한정함 - 따라서 "name=file" 문자열 포함여부를 검사하여 part 데이터타입 구분 --- src/main/java/com/softeer/podo/log/filter/RequestWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/softeer/podo/log/filter/RequestWrapper.java b/src/main/java/com/softeer/podo/log/filter/RequestWrapper.java index 096f912..8e48ec4 100644 --- a/src/main/java/com/softeer/podo/log/filter/RequestWrapper.java +++ b/src/main/java/com/softeer/podo/log/filter/RequestWrapper.java @@ -96,7 +96,7 @@ public Collection getParts() { List infos = parseMultipart(body, delimiter); for(Info info: infos) { // 파일이 아니라면 로깅을 위해 저장 - if(!info.getHeaders().get(CONTENT_DISPOSITION_HEADER).contains("filename")) { + if(!info.getHeaders().get(CONTENT_DISPOSITION_HEADER).contains("name=\"file\"")) { String partJson = new String(info.getBody()); putMdc(BODY_MDC, partJson); }