From: Graham Leggett Date: Sat, 14 Sep 2013 14:12:54 +0000 (+0000) Subject: Easy votes: sync 2.4 and trunk X-Git-Tag: 2.4.7~234 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e83712ef157c3b56d6c01528a47f5e67b9617536;p=apache Easy votes: sync 2.4 and trunk - Avoid some memory allocation and work when TRACE1 is not activated - fix typo in include guard - indent - No need to lower the string before removing the path, it is just a waste of time... - Save a few cycles trunk patch: http://svn.apache.org/r1451478 http://svn.apache.org/r1514215 http://svn.apache.org/r1452195 http://svn.apache.org/r1517025 http://svn.apache.org/r1517045 Submitted by: jailletc36 Reviewed by: jim, minfrin git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1523248 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 88d610f476..7976908b31 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,14 @@ Changes with Apache 2.4.7 + * Sync 2.4 and trunk + - Avoid some memory allocation and work when TRACE1 is not activated + - fix typo in include guard + - indent + - No need to lower the string before removing the path, it is just a waste of time... + - Save a few cycles + [Christophe Jaillet ] + *) mod_filter: Add "change=no" as a proto-flag to FilterProtocol to remove a providers initial flags set at registration time. [Eric Covener] diff --git a/STATUS b/STATUS index 5f5b633b37..f929fefe8f 100644 --- a/STATUS +++ b/STATUS @@ -164,20 +164,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: 2.4.x patch: trunk patch works +1: trawick, covener, humbedooh - * Easy votes: sync 2.4 and trunk - - Avoid some memory allocation and work when TRACE1 is not activated - - fix typo in include guard - - indent - - No need to lower the string before removing the path, it is just a waste of time... - - Save a few cycles - trunk patch: http://svn.apache.org/r1451478 - http://svn.apache.org/r1514215 - http://svn.apache.org/r1452195 - http://svn.apache.org/r1517025 - http://svn.apache.org/r1517045 - 2.4.x patch: trunk patch works - +1: jailletc36, jim, minfrin - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 0ee2ff35e1..a0a937f4fd 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -1700,19 +1700,19 @@ static const char * New->name = apr_pstrdup(parms->pool, arg); New->hostaddr = NULL; - if (ap_proxy_is_ipaddr(New, parms->pool)) { + if (ap_proxy_is_ipaddr(New, parms->pool)) { #if DEBUGGING - ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - "Parsed addr %s", inet_ntoa(New->addr)); - ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - "Parsed mask %s", inet_ntoa(New->mask)); + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, + "Parsed addr %s", inet_ntoa(New->addr)); + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, + "Parsed mask %s", inet_ntoa(New->mask)); #endif - } - else if (ap_proxy_is_domainname(New, parms->pool)) { - ap_str_tolower(New->name); + } + else if (ap_proxy_is_domainname(New, parms->pool)) { + ap_str_tolower(New->name); #if DEBUGGING - ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, - "Parsed domain %s", New->name); + ap_log_error(APLOG_MARK, APLOG_STARTUP, 0, NULL, + "Parsed domain %s", New->name); #endif } else if (ap_proxy_is_hostname(New, parms->pool)) { diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c index cffad2e70a..714014de46 100644 --- a/modules/proxy/mod_proxy_http.c +++ b/modules/proxy/mod_proxy_http.c @@ -1873,7 +1873,7 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker, return DECLINED; if ((u - url) > 14) return HTTP_BAD_REQUEST; - scheme = apr_pstrndup(p, url, u - url); + scheme = apr_pstrmemdup(p, url, u - url); /* scheme is lowercase */ ap_str_tolower(scheme); /* is it for us? */ diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index d6a62479d8..d3dd06868e 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -1080,7 +1080,6 @@ PROXY_DECLARE(proxy_balancer *) ap_proxy_get_balancer(apr_pool_t *p, int i; proxy_hashes hash; - ap_str_tolower(uri); c = strchr(uri, ':'); if (c == NULL || c[1] != '/' || c[2] != '/' || c[3] == '\0') { return NULL; @@ -1089,6 +1088,7 @@ PROXY_DECLARE(proxy_balancer *) ap_proxy_get_balancer(apr_pool_t *p, if ((c = strchr(c + 3, '/'))) { *c = '\0'; } + ap_str_tolower(uri); hash.def = ap_proxy_hashfunc(uri, PROXY_HASHFUNC_DEFAULT); hash.fnv = ap_proxy_hashfunc(uri, PROXY_HASHFUNC_FNV); balancer = (proxy_balancer *)conf->balancers->elts; diff --git a/modules/test/mod_optional_hook_export.h b/modules/test/mod_optional_hook_export.h index 7af6862043..223f5914e9 100644 --- a/modules/test/mod_optional_hook_export.h +++ b/modules/test/mod_optional_hook_export.h @@ -15,7 +15,7 @@ */ #ifndef MOD_OPTIONAL_HOOK_EXPORT_H -#define MOD_OPTOPNAL_HOOK_EXPORT_H +#define MOD_OPTIONAL_HOOK_EXPORT_H #include "ap_config.h" diff --git a/server/util_script.c b/server/util_script.c index 12a056f542..3bc1b00a63 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -73,9 +73,10 @@ static char *http2env(request_rec *r, const char *w) *cp++ = '_'; } else { - ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, - "Not exporting header with invalid name as envvar: %s", - ap_escape_logitem(r->pool, w)); + if (APLOGrtrace1(r)) + ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, r, + "Not exporting header with invalid name as envvar: %s", + ap_escape_logitem(r->pool, w)); return NULL; } } @@ -594,9 +595,10 @@ AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer, "Invalid status line from script '%s': %.30s", apr_filepath_name_get(r->filename), l); else - ap_log_rerror(SCRIPT_LOG_MARK, APLOG_TRACE1, 0, r, - "Status line from script '%s': %.30s", - apr_filepath_name_get(r->filename), l); + if (APLOGrtrace1(r)) + ap_log_rerror(SCRIPT_LOG_MARK, APLOG_TRACE1, 0, r, + "Status line from script '%s': %.30s", + apr_filepath_name_get(r->filename), l); r->status_line = apr_pstrdup(r->pool, l); } else if (!strcasecmp(w, "Location")) {