]> granicus.if.org Git - apache/commitdiff
fix %b format to write really "-" if bytes_sent == 0.
authorAndré Malo <nd@apache.org>
Tue, 19 Aug 2003 16:03:03 +0000 (16:03 +0000)
committerAndré Malo <nd@apache.org>
Tue, 19 Aug 2003 16:03:03 +0000 (16:03 +0000)
Submitted by: Kess

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101021 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/loggers/mod_log_config.c

diff --git a/CHANGES b/CHANGES
index 745785f51c0e70698377e5164e3e732979d7cf84..d25fcf336f22950a6f3b4b2d7e8cfdebf0b7f0fa 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.0-dev
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) mod_log_config: Fix %b log format to write really "-" when 0 bytes
+     were sent (e.g. with 304 or 204 response codes).  [Astrid Keßler]
+
   *) Fix a bug, where mod_deflate sometimes unconditionally compressed the
      content if the Accept-Encoding header contained only other tokens than
      "gzip" (such as "deflate"). PR 21523.  [Joe Orton, André Malo]
index 6b11e6f419951e1cd29ba4460b11bf5d2ae9e5b8..414038397aed7f754da1a69d68da58138dfd4dd6 100644 (file)
@@ -418,7 +418,7 @@ static const char *log_status(request_rec *r, char *a)
 
 static const char *clf_log_bytes_sent(request_rec *r, char *a)
 {
-    if (!r->sent_bodyct) {
+    if (!r->sent_bodyct || !r->bytes_sent) {
         return "-";
     }
     else {
@@ -428,7 +428,7 @@ static const char *clf_log_bytes_sent(request_rec *r, char *a)
 
 static const char *log_bytes_sent(request_rec *r, char *a)
 {
-    if (!r->sent_bodyct) {
+    if (!r->sent_bodyct || !r->bytes_sent) {
         return "0";
     }
     else {