Wrt to the contentlength, we are setting setContentLength in our application and it is always going as chunked in transfer encoding.
We have two servlet, It is working in one and other it is not working.
DO content Type has any direct relation to contentLength
response.setContentType("text/xml") works fine
response.setContentType("text/html") not working.