woosung1223 opened a new pull request, #653: URL: https://github.com/apache/tomcat/pull/653
Hi there! I found unnecessary code in the Response class. Currently, it seems that only headers of Content-Length or Content-Type are called Special Headers. However, as you can see in the code below, `checkSpecialHeader` already checks for Content-Type and Content-Length with ignoring cases, so It is not necessary to check whether the first letter is c or C in the setHeader or addHeader methods. ```java private boolean checkSpecialHeader(String name, String value) { // XXX Eliminate redundant fields !!! // ( both header and in special fields ) if (name.equalsIgnoreCase("Content-Type")) { setContentType(value); return true; } if (name.equalsIgnoreCase("Content-Length")) { try { ... ``` It's a simple change, but I suggest it because it makes it easier to see the flow. -- 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