On 06/06/2011 19:15, Mark Thomas wrote: > On 06/06/2011 18:43, Caldarale, Charles R wrote: >>> From: Mark Thomas [mailto:ma...@apache.org] >>> Subject: Re: svn commit: r1132367 - in /tomcat/trunk: >>> java/org/apache/coyote/http11/Http11AprProcessor.java >>> webapps/docs/changelog.xml >> >>> On 06/06/2011 09:01, Remy Maucherat wrote: >>>> 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) >> >> That's not the issue; the question is how could sendFileData.pos be non-zero >> in an object that was just instantiated from a class that has no explicit >> constructor? > > Doh. Got it. We do need to modify the length to handle range requests, > but not like that.
I got confused between the APR SendfileData and the NIO SendfileData. APR is fine - I'll revert this change and the changelog entry. Both are currently working. I will be making some further changes to align the two so I can reduce the duplication. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org