]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
fix %b format to write really "-" if bytes_sent == 0.
authorAndré Malo <nd@apache.org>
Sun, 21 Sep 2003 21:23:34 +0000 (21:23 +0000)
committerAndré Malo <nd@apache.org>
Sun, 21 Sep 2003 21:23:34 +0000 (21:23 +0000)
Submitted by: Kess

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

CHANGES
STATUS
modules/loggers/mod_log_config.c

diff --git a/CHANGES b/CHANGES
index 0bd4552d06ead6fad075e823d4995833f774d063..b1a0f57ab03ee25ceb681e6155b9752cf3919b3f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.48
 
+  *) 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]
+
   *) Modify ap_get_client_block() to note if it has seen EOS.
      [Justin Erenkrantz]
 
diff --git a/STATUS b/STATUS
index bef5e70112d3a60993d0b4f2afbf96be8e96b6ff..a8b3e18e244a0e1ed5915204177800a10d55367f 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -1,5 +1,5 @@
 APACHE 2.0 STATUS:                                              -*-text-*-
-Last modified at [$Date: 2003/09/19 20:06:31 $]
+Last modified at [$Date: 2003/09/21 21:23:34 $]
 
 Release:
 
@@ -289,10 +289,6 @@ PATCHES TO PORT FROM 2.1
         modules/mappers/mod_rewrite.c: r1.228
       +1: nd
 
-    * Fix mod_log_config's %b format to write "-" in case of bytes_sent == 0.
-        modules/loggers/mod_log_config.c: r1.106
-      +1: nd, jorton, trawick
-
     * Overhaul of mod_include's filter parser.
         modules/filters/mod_include.c: r1.235, r1.236
         modules/filters/mod_include.h: r1.35
index 492ac521afc6c676304960488c8af4b5e8aac214..2e1fec74f47c3320e0d54931237556bd48fe90e7 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 {