Skip to content

Commit

Permalink
refactor: 응답 로그가 쿼리스트링 출력하도록 보완 (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
helenason authored Dec 24, 2024
1 parent b9b2020 commit 29670c8
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void afterCompletion(HttpServletRequest request,
String identifier = UUID.randomUUID().toString();
MemberIdentifier memberIdentifier = new MemberIdentifier(request.getCookies());
String httpMethod = request.getMethod();
String uri = request.getRequestURI();
String uri = parseUri(request.getRequestURI(), request.getQueryString());
String requestBody = new String(request.getInputStream().readAllBytes());

CachedHttpServletResponseWrapper cachedResponse = (CachedHttpServletResponseWrapper) response;
Expand Down Expand Up @@ -100,4 +100,11 @@ private boolean isMultipart(HttpServletRequest request) {
String contentType = request.getContentType();
return contentType != null && contentType.toLowerCase().startsWith("multipart/");
}

private String parseUri(String requestUri, String queryString) {
if (queryString == null) {
return requestUri;
}
return requestUri + "?" + queryString;
}
}

0 comments on commit 29670c8

Please sign in to comment.