In tomcat Content Length set in response for range requests for more than one byte ranges is not equal to the sum of content length of all range requests.
Here are request and response headers:
GET MYReport_compilation.pdf HTTP/1.1
Accept: */*
Range: bytes=1804578-1805257, 1805258-1805277, 1812358-1813377, 1805278-1805597
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
Host: www.abc.com
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: JSESSIONID=C278016007CA868723C3EA7AD9BB9B23;
HTTP/1.1 206 Partial Content
Accept-Ranges: bytes
ETag: W/"1891110-1067446699000"
Last-Modified: Wed, 29 Oct 2003 16:58:19 GMT
Content-Type: multipart/byteranges; boundary=CATALINA_MIME_BOUNDARY
Content-Length: 2496
Date: Tue, 29 Nov 2005 18:25:12 GMT
Server: Apache-Coyote/1.1
sum of content length of byte ranges=(1805257-1804578)+(1805277-1805258)(1813377-1812358)+(1805597-1805278)=679+19+1019+319 =2036
but the conetent legth is set as 2496
The same thing happens with other multiple byte range requests.
For some multiple byte range response content legth is not set and for some multiple byte range requests contenet-length is not correct