Merge pull request #31731 from kilink
* pr/31731: Avoid byte array copy in getContentAsString Closes gh-31731
This commit is contained in:
commit
0dbb0f5c14
|
|
@ -205,7 +205,7 @@ public class ContentCachingRequestWrapper extends HttpServletRequestWrapper {
|
|||
* @see #getContentAsByteArray()
|
||||
*/
|
||||
public String getContentAsString() {
|
||||
return new String(this.cachedContent.toByteArray(), Charset.forName(getCharacterEncoding()));
|
||||
return new String(this.cachedContent.toByteArrayUnsafe(), Charset.forName(getCharacterEncoding()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue