Skip to content

Commit

Permalink
fix: 로깅 조건 수정
Browse files Browse the repository at this point in the history
- multipart/form-data에서 part에 Content-Type 지정하는 경우는 파일에 한정함
- 따라서 "name=file" 문자열 포함여부를 검사하여 part 데이터타입 구분
  • Loading branch information
eckrin committed Aug 22, 2024
1 parent a2c4472 commit 1d61d02
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public Collection<Part> getParts() {
List<Info> 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);
}
Expand Down

0 comments on commit 1d61d02

Please sign in to comment.