From: André Malo Date: Sun, 21 Sep 2003 21:23:34 +0000 (+0000) Subject: fix %b format to write really "-" if bytes_sent == 0. X-Git-Tag: 2.0.48~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=246ec34dad508c324f28835dae2202f1d6a9fecc;p=thirdparty%2Fapache%2Fhttpd.git fix %b format to write really "-" if bytes_sent == 0. 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 --- diff --git a/CHANGES b/CHANGES index 0bd4552d06e..b1a0f57ab03 100644 --- 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 bef5e70112d..a8b3e18e244 100644 --- 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 diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 492ac521afc..2e1fec74f47 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -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 {