Red Hat Bugzilla – Bug 175072
cancelled download of file produced 200 ok log entry
Last modified: 2007-11-30 17:11:18 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 Epiphany/1.6.5
Description of problem:
I have a file called 1g on an apache server which is 1 gigabytes.
Using wget, I download the file, and cancel the download at 10%.
The apache access log (combined format) shows:
192.168.x.x - - [06/Dec/2005:10:01:15 +0100] "GET /1g HTTP/1.1" 200 1073741824
Perhaps I've misunderstood things, but I was expecting a 206 partial content status in place of the 200 ok.
and again, perhaps I've misunderstood, but I was expecting the size of the data transferred to the client as the last field, rather than the size of the file on disk.
"The last entry indicates the size of the object returned to the client, not including the response headers."
Same with curl, as you would expect.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
You get a 206 only if the client requested a byte-ranged response. See here:
for the difference between %O and %b.
Okay, so if the request was made, but never fulfilled, 200 is the correct code.
Got you. I didn't know that.
But your other point says to look at the difference between %b and %0.
The common log format uses %b, which is the "size of response in bytes". The
response size was 100 megabytes. The log says a gigabyte.
I didn't mean fulfilled, I meant "completed" for that first part.
The size of the HTTP response is 1Gb if you GET a 1Gb file. The number of bytes
sent to the client is reflected by %b, per the docs URL:
Note that in httpd 2.0, unlike 1.3, the %b and %B format strings do not
represent the number of bytes sent to the client, but simply the size in bytes
of the HTTP response (which will differ, for instance, if the connection is
aborted, or if SSL is used). The %O format provided by mod_logio will log the
actual number of bytes sent over the network.
please don't reopen this bug, take up further discussion on
firstname.lastname@example.org if you have more questions.