https://issues.apache.org/bugzilla/show_bug.cgi?id=51168
Bug #: 51168
Summary: mod_status Total Traffic won't take account of
internal-redirected requests
Product: Apache httpd-2
Version: 2.0.63
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: Core
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 26969
--> https://issues.apache.org/bugzilla/attachment.cgi?id=26969
patch scoreboard.c to use final served response size
I've just noticed that when a request is rewrited by mod_rewrite, its
traffic won't be accounted into "Total Traffic" by mod_status.
I'm using Apache/2.0.63 on freebsd (stock ports), experiments are
preformed in the following way:
dd if=/dev/urandom of=10m_file bs=1048576 count=10
cat > .htaccess
RewriteEngine On
RewriteRule ^10m_rw$ 10_file
^D
curl -v 'http://192.168.1.1/server-status?auto' # take a note of
Total kBytes field
curl -v 'http://192.168.1.1/10m_file' -o 10m_tmp
curl -v 'http://192.168.1.1/server-status?auto' # Total kBytes field
do increment about ~10MB
curl -v 'http://192.168.1.1/10m_rw' -o 10m_tmp
curl -v 'http://192.168.1.1/server-status?auto' # Total kBytes field
only increases a few hundred kB's
I've found the problem is that when scoreboard.c incrementing counters it won't
check if the request is being redirected, thus ignoring the new request_rec
struct chain pointed by 'next' field. It always use the original request_rec
for bytes_sent accounting, which is potentially wrong.
The patch applied will make scoreboard.c use bytes_sent of final served
response as the increment value.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]