Received: (qmail 3213 invoked by uid 501); 14 Nov 2000 14:17:09 -0000 Message-Id: <20001114141709.3211.qmail@locus.apache.org> Date: 14 Nov 2000 14:17:09 -0000 From: Anthony Howe Reply-To: achowe@snert.com To: submit@bugz.apache.org Subject: mod_proxy does not maintain the request_rec->bytes_sent field. X-Send-Pr-Version: 3.110 >Number: 6841 >Category: mod_proxy >Synopsis: mod_proxy does not maintain the request_rec->bytes_sent field. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Tue Nov 14 06:20:01 PST 2000 >Closed-Date: Wed May 29 13:37:03 PDT 2002 >Last-Modified: Wed May 29 13:37:03 PDT 2002 >Originator: achowe@snert.com >Release: 1.3.14 >Organization: >Environment: Linux mail.snert.net 2.0.34C52_SK #1 Tue Nov 30 18:14:40 PST 1999 mips unknown >Description: 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. >How-To-Repeat: >Fix: *** 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; } >Release-Note: >Audit-Trail: State-Changed-From-To: open-closed State-Changed-By: martin State-Changed-When: Wed May 29 13:37:03 PDT 2002 State-Changed-Why: Patch will be (finally!) included in 1.3.25, thanks! >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]