summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2009-12-14 15:58:50 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2009-12-14 15:58:50 +0000
commit717328baf31e30a63693b7942a05de461b7d531a (patch)
tree46453816b56087ba5de02df172e79977e571d611
parentaed0b0c31c92c2753aca24547a262c5d0fdc6fbf (diff)
downloadlighttpd-717328baf31e30a63693b7942a05de461b7d531a.tar.gz
mod_accesslog: support %e (fixes #2113, thx presbrey)
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@2700 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--src/mod_accesslog.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mod_accesslog.c b/src/mod_accesslog.c
index e26bee89..419fc463 100644
--- a/src/mod_accesslog.c
+++ b/src/mod_accesslog.c
@@ -787,6 +787,13 @@ REQUESTDONE_FUNC(log_access_write) {
buffer_append_string_len(b, CONST_STR_LEN("-"));
}
break;
+ case FORMAT_ENV:
+ if (NULL != (ds = (data_string *)array_get_element(con->environment, CONST_BUF_LEN(p->conf.parsed_format->ptr[j]->string)))) {
+ accesslog_append_escaped(b, ds->value);
+ } else {
+ buffer_append_string_len(b, CONST_STR_LEN("-"));
+ }
+ break;
case FORMAT_FILENAME:
if (con->physical.path->used > 1) {
buffer_append_string_buffer(b, con->physical.path);
@@ -853,7 +860,6 @@ REQUESTDONE_FUNC(log_access_write) {
{ 'A', FORMAT_LOCAL_ADDR },
{ 'C', FORMAT_COOKIE },
{ 'D', FORMAT_TIME_USED_MS },
- { 'e', FORMAT_ENV },
*/
break;