Created
January 18, 2021 04:44
-
-
Save vrnsky/2c13190017d7d23e205a6a69ed877e99 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static ContentCachingRequestWrapper wrapRequest(HttpServletRequest httpServletRequest) { | |
if (httpServletRequest instanceof ContentCachingRequestWrapper) { | |
return (ContentCachingRequestWrapper) httpServletRequest; | |
} else { | |
return new ContentCachingRequestWrapper(httpServletRequest); | |
} | |
} | |
private static ContentCachingResponseWrapper wrapResponse(HttpServletResponse httpServletResponse) { | |
if (httpServletResponse instanceof ContentCachingResponseWrapper) { | |
return (ContentCachingResponseWrapper) httpServletResponse; | |
} else { | |
return new ContentCachingResponseWrapper(httpServletResponse); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment