summaryrefslogtreecommitdiffstats
path: root/modules/loggers
diff options
context:
space:
mode:
Diffstat (limited to 'modules/loggers')
-rw-r--r--modules/loggers/mod_log_config.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c
index b5cc19fb27..e2813fe606 100644
--- a/modules/loggers/mod_log_config.c
+++ b/modules/loggers/mod_log_config.c
@@ -119,6 +119,10 @@
* follows:
*
* %...b: bytes sent, excluding HTTP headers.
+ * %...c: Status of the connection.
+ * 'X' = connection aborted before the response completed.
+ * '+' = connection may be kept alive after the response is sent.
+ * '-' = connection will be closed after the response is sent.
* %...{FOOBAR}e: The contents of the environment variable FOOBAR
* %...f: filename
* %...h: remote host
@@ -463,7 +467,18 @@ static const char *log_child_pid(request_rec *r, char *a)
{
return apr_psprintf(r->pool, "%ld", (long) getpid());
}
+static const char *log_connection_status(request_rec *r, char *a)
+{
+ if (r->connection->aborted)
+ return "X";
+
+ if ((r->connection->keepalive) &&
+ ((r->server->keep_alive_max - r->connection->keepalives) > 0)) {
+ return "+";
+ }
+ return "-";
+}
/*****************************************************************
*
* Parsing the log format string
@@ -536,6 +551,9 @@ static struct log_item_list {
'P', log_child_pid, 0
},
{
+ 'c', log_connection_status, 0
+ },
+ {
'\0'
}
};