www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Howe <ach...@snert.com>
Subject mod_proxy/6841: mod_proxy does not maintain the request_rec->bytes_sent field.
Date Tue, 14 Nov 2000 14:17:09 GMT

>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:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Nov 14 06:20:01 PST 2000
>Originator:     achowe@snert.com
>Release:        1.3.14
Linux mail.snert.net 2.0.34C52_SK #1 Tue Nov 30 18:14:40 PST 1999 mips unknown
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.


*** 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 ----
+ 	r->bytes_sent += total_bytes_rcvd;
      return total_bytes_rcvd;
 [In order for any reply to be added to the PR database, you need]
 [to include <apbugs@Apache.Org> 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!     ]

View raw message