On 27/02/17 06:55, Nisala Nanayakkara wrote:
> Hi all,
> 
> I have gone through the the jira[1] and find out that the corresponding fix
> as given here[2]. But in the jira it says that "make sure the start time
> isn't zero before doing the subtraction". But in the logic it is
> implemented as follows ,
> 
> long startTime = req.getStartTime();
> if (getStage() == org.apache.coyote.Constants.STAGE_ENDED || startTime < 0)
> {
>       return 0;
> } else {
>       return (System.currentTimeMillis() - startTime);
> }
> 
> According to this implementation, it does the subtraction even the
> startTime is 0. Is it a bug ?? Am I missed something here ?

Yes.

Take a closer look at the possible values for startTime.

Mark

> 
> [1] - https://bz.apache.org/bugzilla/show_bug.cgi?id=60123
> [2] -
> https://github.com/apache/tomcat70/blob/TOMCAT_7_0_75/java/org/apache/coyote/RequestInfo.java#L129
> 
> Thanks,
> Nisala
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to