httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 9497] New: - mod_proxy does not maintain the request_rec->bytes_sent field (old bug #6841)
Date Wed, 29 May 2002 16:42:18 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9497>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9497

mod_proxy does not maintain the request_rec->bytes_sent field (old bug #6841)

           Summary: mod_proxy does not maintain the request_rec->bytes_sent
                    field (old bug #6841)
           Product: Apache httpd-1.3
           Version: HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: achowe@snert.com


Old Bug #6841 was never addressed.


A user reported a bug against mod_throttle claiming that mod_throttle failed to
record the number of bytes sent when the request passed through mod_proxy. Apon
debugging and examination of the mod_proxy source, I found that 
ap_proxy_send_fb() tracked and returned the number of bytes received/sent,
but that NO ONE made use of the return value to update the request_rec's
bytes_sent field.

Find enclosed a one line change to src/modules/proxy/proxy_util.c that updates
the request_rec.

By making the change in ap_proxy_send_fb(), http and ftp response from the
remote server or from the cache will all correctly update the request_rec
so that other modules can make use of this information in the logging phase. 

This fix would be especially useful for mod_throttle and mod_watch.


*** proxy_util.c.orig    Tue Nov 14 14:34:42 2000
--- proxy_util.c    Tue Nov 14 14:49:25 2000
***************
*** 618,623 ****
--- 618,626 ----
      ap_bflush(con->client);

      ap_kill_timeout(r);
+
+     r->bytes_sent += total_bytes_rcvd;
+
      return total_bytes_rcvd;
  }

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message