To get the Content-Length in bytes instead of chunked inside the response with HTTP 1.1, you must set the Content-Length header and its size (long or int) based on the file that you expect inside the response. it will be good for a long time, so it can take care of a small as well as a large file size. The answer will be HttpServletResponse. response.addHeader (Content-Length, Long.toString ()); Thank,
source
share