Is it possible for a HTTP 1.1 client to set a header value that indicates the responses to requests should not be chunked? Or is the only way to prevent this, is to send a H
To get Content-Length in bytes instead of chunked inside the response with HTTP 1.1, you have to set Content-Length header and its size (long or int) based on the file you are expecting inside the response. long will be good so it can take care small as well as big file size. response will be HttpServletResponse. response.addHeader(Content-Length, Long.toString()); Thanks,
In HTTP (starting with HTTP/1.1), recipients MUST support chunked encoding. See http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p1-messaging-26.html#rfc.section.4.1.p.4.