tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r1132367 - in /tomcat/trunk: java/org/apache/coyote/http11/Http11AprProcessor.java webapps/docs/changelog.xml
Date Mon, 06 Jun 2011 16:55:41 GMT
On 06/06/2011 09:01, Remy Maucherat wrote:
> On Sun, 2011-06-05 at 10:21 +0000, markt@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message