Bug 46991

Summary: "Bytes received " problem
Product: Tomcat 6 Reporter: huangfeng <huangfeng>
Component: Manager applicationAssignee: Tomcat Developers Mailing List <dev>
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: default   
Hardware: PC   
OS: Windows XP   

Description huangfeng 2009-04-08 01:37:54 UTC
use jk module

submit some data with post method ,but  "Bytes received" always show zero

see source file ,JkCoyoteHandler.java ,in "inovke" method

 public int invoke( Msg msg, MsgContext ep )
        throws IOException {
        if( ep.isLogTimeEnabled() )
            ep.setLong( MsgContext.TIMER_PRE_REQUEST, System.currentTimeMillis());

        Request req=ep.getRequest();
        Response res=req.getResponse();

        if( log.isDebugEnabled() )
            log.debug( "Invoke " + req + " " + res + " " + req.requestURI().toString());

        res.setNote( epNote, ep );
        ep.setStatus( MsgContext.JK_STATUS_HEAD );
        RequestInfo rp = req.getRequestProcessor();
        try {
            adapter.service( req, res );
        } catch( Exception ex ) {
            log.info("Error servicing request " + req,ex);
        if(ep.getStatus() != MsgContext.JK_STATUS_CLOSED) {
        req.updateCounters();   //see this line
        if( ep.getStatus() == MsgContext.JK_STATUS_ERROR ) {
            return ERROR;
        ep.setStatus( MsgContext.JK_STATUS_NEW );
        return OK;

 the request object recycled,the "byteRead" property must be set to zero ,but at the next line ,begin to "updateCounters",this may be a bug
Comment 1 Mark Thomas 2009-04-08 09:31:45 UTC
Thanks for the report. This has been fixed in trunk and proposed for 6.0.x
Comment 2 huangfeng 2009-04-08 19:10:15 UTC
(In reply to comment #1)
> Thanks for the report. This has been fixed in trunk and proposed for 6.0.x

which version ? I use version 6.0.18,how can I get the fixed version?
Comment 3 Mark Thomas 2009-04-09 01:51:44 UTC
It will probably be in 6.0.20 but that depends on a) it getting the 3 +1 votes to be back-ported and b) there being a 6.0.20 release. Given that 6.0.19 is still in progress 6.0.20 is likely to be some time away.

Alternatively, you can build Tomcat from source with the patch. If you want to do that, the users list is the place to get help.
Comment 4 huangfeng 2009-04-09 02:11:27 UTC
Thanks !
Comment 5 Mark Thomas 2009-04-28 06:23:35 UTC
This has been fixed in 6.0.x and will be in 6.0.20 onwards.