morning-gu commented on code in PR #867: URL: https://github.com/apache/tomcat/pull/867#discussion_r2139963921
########## java/org/apache/coyote/Request.java: ########## @@ -389,14 +389,18 @@ public void setLocalPort(int port) { // -------------------- encoding/type -------------------- public CharsetHolder getCharsetHolder() { - if (charsetHolder.getName() == null) { + if (charsetHolder == null) { charsetHolder = CharsetHolder.getInstance(getCharsetFromContentType(getContentType())); } return charsetHolder; } public void setCharsetHolder(CharsetHolder charsetHolder) { + if (charsetHolder == null || charsetHolder.getName() == null) { + this.charsetHolder = null; + return; Review Comment: Okay, I have resolved it, thank you. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org