From: Eric Covener Date: Tue, 15 Jul 2014 14:18:17 +0000 (+0000) Subject: Suggestion from Rick Houser -- for compatibility, pick an unusual X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ea001b2e6f7004510ed778e0faa98f9aa322617;p=thirdparty%2Fapache%2Fhttpd.git Suggestion from Rick Houser -- for compatibility, pick an unusual character as the first character in a 2/3 character pattern. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1610707 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 973c3748cf9..ee54b061744 100644 --- a/CHANGES +++ b/CHANGES @@ -1,8 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.5.0 - *) mod_log_config: Allow two character log formats to be registered and used. - [Eric Covener] + *) mod_log_config: Allow three character log formats to be registered. For + backwards compatibility, the first character of a three-character format + must be the '^' (caret) character. [Eric Covener] *) mod_ssl: Extend the scope of SSLSessionCacheTimeout to sessions resumed by TLS session resumption (RFC 5077). [Rainer Jung] diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c index 624165146e0..569a7484051 100644 --- a/modules/loggers/mod_log_config.c +++ b/modules/loggers/mod_log_config.c @@ -987,11 +987,11 @@ static char *parse_log_item(apr_pool_t *p, log_format_item *it, const char **sa) break; default: - /* check for exactly two character format first */ - if (*(s+1)) { - handler = (ap_log_handler *)apr_hash_get(log_hash, s, 2); + /* check for '^' + two character format first */ + if (*s == '^' && *(s+1) && *(s+2)) { + handler = (ap_log_handler *)apr_hash_get(log_hash, s, 3); if (handler) { - s += 2; + s += 3; } } if (!handler) {