and sent byte counts.
PR54015 [Martijn T. <apache_bugzilla@mindcontrolled.nl>, Christophe JAILLET]
trunk: http://svn.apache.org/r1484910
http://svn.apache.org/r1517386
Submitted by: jailletc36
Reviewed by: jim, humbedooh
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@
1523269 13f79535-47bb-0310-9956-
ffa450edef68
Changes with Apache 2.4.7
+ *) mod_logio: new format-specifier %C (combined) which is the sum of received
+ and sent byte counts.
+ PR54015 [Christophe Jaillet]
+
*) mod_deflate: Improve error detection when decompressing request bodies
with trailing garbage: handle case where trailing bytes are in
the same bucket. [Rainer Jung]
2.4.x patch: trunk works, if 1496338 above is merged first.
+1: covener, jim, humbedooh
- * mod_logio: new format-specifier %S (sum) which is the sum of received
- and sent byte counts.
- PR54015 [Martijn T. <apache_bugzilla@mindcontrolled.nl>, Christophe JAILLET]
- trunk: http://svn.apache.org/r1484910
- http://svn.apache.org/r1517386
- 2.4.x patch: trunk patch works
- +1: jailletc36, jim, humbedooh
-
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
[ New proposals should be added at the end of the list ]
<tr><td><code>%O</code></td>
<td>Bytes sent, including headers. Cannot be zero. You need to
enable <module>mod_logio</module> to use this.</td></tr>
+
+ <tr><td><code>%S</code></td>
+ <td>Bytes transferred (received and sent), including request and headers,
+ cannot be zero. This is the combination of %I and %O. You need to
+ enable <module>mod_logio</module> to use this.</td></tr>
+
</table>
<section id="modifiers"><title>Modifiers</title>
<tr><th>Format String</th>
<th>Description</th></tr>
- <tr><td><code>%...I</code></td>
+ <tr><td><code>%I</code></td>
<td>Bytes received, including request and headers, cannot be
zero.</td></tr>
- <tr><td><code>%...O</code></td>
+ <tr><td><code>%O</code></td>
<td>Bytes sent, including headers, cannot be zero.</td></tr>
+
+ <tr><td><code>%S</code></td>
+ <td>Bytes transferred (received and sent), including request and headers,
+ cannot be zero. This is the combination of %I and %O.</td></tr>
</table>
<p>Usually, the functionality is used like this:</p>
*/
/*
- * Written by Bojan Smojver <bojan rexursive.com>:
- *
- * The argument to LogFormat and CustomLog is a string, which can include
- * literal characters copied into the log files, and '%' directives as
- * follows:
- *
- * %...I: bytes received, including request and headers, cannot be zero
- * %...O: bytes sent, including headers, cannot be zero
- *
+ * Written by Bojan Smojver <bojan rexursive.com>.
*/
#include "apr_strings.h"
return apr_off_t_toa(r->pool, cf->bytes_out);
}
+static const char *log_bytes_combined(request_rec *r, char *a)
+{
+ logio_config_t *cf = ap_get_module_config(r->connection->conn_config,
+ &logio_module);
+
+ return apr_off_t_toa(r->pool, cf->bytes_out + cf->bytes_in);
+}
+
/*
* Reset counters after logging...
*/
if (log_pfn_register) {
log_pfn_register(p, "I", log_bytes_in, 0);
log_pfn_register(p, "O", log_bytes_out, 0);
+ log_pfn_register(p, "S", log_bytes_combined, 0);
}
return OK;