On 06/06/2011 09:01, Remy Maucherat wrote: > On Sun, 2011-06-05 at 10:21 +0000, ma...@apache.org wrote: >> Author: markt >> Date: Sun Jun 5 10:21:25 2011 >> New Revision: 1132367 >> >> URL: http://svn.apache.org/viewvc?rev=1132367&view=rev >> Log: >> Correctly handle range requests when using sendfile and the APR/native HTTP >> connector. >> - "org.apache.tomcat.sendfile.end")).longValue(); >> + "org.apache.tomcat.sendfile.end")).longValue() - >> sendfileData.pos; > > I don't understand, the code reads: > sendfileData = new AprEndpoint.SendfileData(); > sendfileData.fileName = fileName; > sendfileData.start = ((Long) request.getAttribute( > "org.apache.tomcat.sendfile.start")).longValue(); > sendfileData.end = ((Long) request.getAttribute( > "org.apache.tomcat.sendfile.end")).longValue() - sendfileData.pos; > > So how can sendfileData.pos not be 0 here ?
Because when the DefaultServlet handles a range request start may be non-zero. (line 1658 in trunk) Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org