Bug 175072 - cancelled download of file produced 200 ok log entry
cancelled download of file produced 200 ok log entry
Product: Fedora
Classification: Fedora
Component: httpd (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
Depends On:
  Show dependency treegraph
Reported: 2005-12-06 04:19 EST by Need Real Name
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-12-06 05:03:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2005-12-06 04:19:47 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."
 -- http://httpd.apache.org/docs/1.3/logs.html#common

Same with curl, as you would expect.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:

Additional info:
Comment 1 Joe Orton 2005-12-06 04:26:14 EST
You get a 206 only if the client requested a byte-ranged response.  See here:


for the difference between %O and %b.
Comment 2 Need Real Name 2005-12-06 04:37:18 EST
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.
Comment 3 Need Real Name 2005-12-06 04:37:51 EST
I didn't mean fulfilled, I meant "completed" for that first part.
Comment 4 Joe Orton 2005-12-06 05:03:36 EST
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
fedora-list@redhat.com if you have more questions.

Note You need to log in before you can comment on or make changes to this bug.