From: Ryan Bloom Date: Sun, 2 Sep 2001 03:21:47 +0000 (+0000) Subject: Fix logging of bytes sent for HEAD requests. %b and %B should X-Git-Tag: 2.0.26~344 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57b309fdd1a03fa834be6fd694bf1aa5e3b726a3;p=apache Fix logging of bytes sent for HEAD requests. %b and %B should log either - or 0, before this patch, they were both logging the file size. PR: 8021 Submitted by: Taketo Kabe git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90870 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 64488a4994..f41930b376 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 2.0.26-dev + *) Fix logging of bytes sent for HEAD requests. %b and %B should + log either - or 0, before this patch, they were both logging + the file size. [Taketo Kabe ] + *) Make mod_include check for BYTE_CHECK_THRESHOLD per bucket rather than per character. [Brian Pane ] diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 86439a7aab..456f486f38 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1311,8 +1311,6 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter( terminate_header(b2); - r->sent_bodyct = 1; /* Whatever follows is real body stuff... */ - ap_pass_brigade(f->next, b2); if (r->header_only) { @@ -1321,6 +1319,8 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_http_header_filter( return OK; } + r->sent_bodyct = 1; /* Whatever follows is real body stuff... */ + if (r->chunked) { /* We can't add this filter until we have already sent the headers. * If we add it before this point, then the headers will be chunked