Bug 145820

Summary: Incorrect GET file chunk size in logs
Product: Red Hat Enterprise Linux 3 Reporter: Kyle Powell <kpowell>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: tao
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-24 15:32:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Kyle Powell 2005-01-21 21:43:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)
Gecko/20040924

Description of problem:
When a file is downloaded with a download accelerator which grabs the
file in chunks though multiple connections, the file size of the first
chunk is incorrectly reported as the size of the entire file. This
problem does not occur on a server running apache 1.3. Here are two
example log file snippets. Notice the file size of the first chunk in
the 1.3 log is reported as 119232 whereas the file size of the first
chunk in the 2.0 log shows 18326600, which is the size of the entire file.

Apache 1.3 (correct)
Fri Jan 21 11:14:53 2005 0 tester.foo.com 119232 /files/downloadme.exe 206
Fri Jan 21 11:15:01 2005 2 tester.foo.com 4581651
/files/downloadme.exe 206
Fri Jan 21 11:15:01 2005 1 tester.foo.com 4581651
/files/downloadme.exe 206
Fri Jan 21 11:15:01 2005 1 tester.foo.com 4581651
/files/downloadme.exe 206
Fri Jan 21 11:15:01 2005 1 tester.foo.com 4581650
/files/downloadme.exe 206

Apache 2.0 (incorrect)
192.168.1.2 - - [20/Jan/2005:17:56:04 -500] "GET /files/downloadme.exe
HTTP/1.1" 206 18326600 "-" "DA 7.0"
192.168.1.2 - - [20/Jan/2005:17:56:07 -500] "GET /files/downloadme.exe
HTTP/1.1" 206 4581651 "-" "DA 7.0"
192.168.1.2 - - [20/Jan/2005:17:56:07 -500] "GET /files/downloadme.exe
HTTP/1.1" 206 4581651 "-" "DA 7.0"
192.168.1.2 - - [20/Jan/2005:17:56:07 -500] "GET /files/downloadme.exe
HTTP/1.1" 206 4581651 "-" "DA 7.0"
192.168.1.2 - - [20/Jan/2005:17:56:07 -500] "GET /files/downloadme.exe
HTTP/1.1" 206 4581650 "-" "DA 7.0"

Version-Release number of selected component (if applicable):
httpd-2.0.46-44.ent

How reproducible:
Always

Steps to Reproduce:
Download a file from an apache 2.0 webserver using a download
accelerator. These were done with Download Accelerator Plus for Windows.

Comment 1 Joe Orton 2005-01-24 15:32:43 UTC
In httpd 2.0, if the connection is aborted before the entire response
read (as is probably the case with this client), the number logged to
the access_log will not match the actual number of bytes sent to the
client.  Similarly, if SSL is used, the number logged will not match
the number of bytes actually sent after the SSL encryption layer is
applied.

The mod_logio module can be used to log the number of bytes sent on
the wire; see:

http://httpd.apache.org/docs-2.0/mod/mod_logio.html
http://httpd.apache.org/docs-2.0/mod/mod_log_config.html#customlog

Comment 2 Joe Orton 2005-01-24 15:34:57 UTC
Note that mod_logio is include but not loaded by default in the
current RHEL3 httpd package, so you need to add a LoadModule directive
for it,

  LoadModule logio_module modules/mod_logio.so