From: Christophe Jaillet Date: Tue, 24 Feb 2015 06:22:22 +0000 (+0000) Subject: Merge r1611979, r1611725, r1588448, r1642803, r1657949, r1451108 (part of it), X-Git-Tag: 2.4.13~405 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99d7794f20fd4034c8a6985631d46973fe658e23;p=thirdparty%2Fapache%2Fhttpd.git Merge r1611979, r1611725, r1588448, r1642803, r1657949, r1451108 (part of it), r1643672, r1496178 from trunk * Synch with trunk: - Add missing APLOGNO. - mod_deflate: don't require by using APR_INT32_MAX instead of INT_MAX. - Move two variable assignments off the fast path. - Fix curly braces style. Remove useless empty lines - tab vs space - Removed tabs. - dump fcgi headers with trace8 instead of debug+compile-time flag. - Drop severity of "LDAP: Setting referrals to ON" from DEBUG to TRACE4 Submitted by: jailletc36, ylavic, minfrin, fuankg, covener Reviewed by: jailletc36, minfrin, ylavic Backported by: jailletc36 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1661845 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/STATUS b/STATUS index 3a7d445392c..bbac82e0319 100644 --- a/STATUS +++ b/STATUS @@ -119,26 +119,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK: 2.4.x patch: trunks works (modulo CHANGES) +1: ylavic, rjung, jailletc36 - * Easy patches - synch with trunk - - Add missing APLOGNO. - - mod_deflate: don't require by using APR_INT32_MAX instead of INT_MAX. - - Move two variable assignments off the fast path. - - Fix curly braces style. Remove useless empty lines - - tab vs space - - Removed tabs. - - dump fcgi headers with trace8 instead of debug+compile-time flag. - - Drop severity of "LDAP: Setting referrals to ON" from DEBUG to TRACE4 - trunk patch: - http://svn.apache.org/r1611979 - http://svn.apache.org/r1611725 - http://svn.apache.org/r1588448 - http://svn.apache.org/r1642803 - http://svn.apache.org/r1657949 - http://svn.apache.org/r1451108 (only one part still has to be applied. Done manually) - http://svn.apache.org/r1496178 - 2.4.x patch: http://people.apache.org/~jailletc36/backport11-v2.patch - +1: jailletc36, minfrin, ylavic - PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 5b13a39582d..b892fa7c762 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -50,8 +50,6 @@ #include "zlib.h" -#include /* for INT_MAX */ - static const char deflateFilterName[] = "DEFLATE"; module AP_MODULE_DECLARE_DATA deflate_module; @@ -934,8 +932,8 @@ static apr_status_t deflate_out_filter(ap_filter_t *f, apr_bucket_delete(e); continue; } - if (len > INT_MAX) { - apr_bucket_split(e, INT_MAX); + if (len > APR_INT32_MAX) { + apr_bucket_split(e, APR_INT32_MAX); apr_bucket_read(e, &data, &len, APR_BLOCK_READ); } @@ -1308,8 +1306,8 @@ static apr_status_t deflate_in_filter(ap_filter_t *f, if (!len) { continue; } - if (len > INT_MAX) { - apr_bucket_split(bkt, INT_MAX); + if (len > APR_INT32_MAX) { + apr_bucket_split(bkt, APR_INT32_MAX); apr_bucket_read(bkt, &data, &len, APR_BLOCK_READ); } @@ -1694,8 +1692,8 @@ static apr_status_t inflate_out_filter(ap_filter_t *f, apr_bucket_delete(e); continue; } - if (len > INT_MAX) { - apr_bucket_split(e, INT_MAX); + if (len > APR_INT32_MAX) { + apr_bucket_split(e, APR_INT32_MAX); apr_bucket_read(e, &data, &len, APR_BLOCK_READ); } diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c index 733e9c82ada..cfe1c4170c0 100644 --- a/modules/http/http_filters.c +++ b/modules/http/http_filters.c @@ -256,7 +256,7 @@ static apr_status_t read_chunked_trailers(http_ctx_t *ctx, ap_filter_t *f, else { const char *error_notes = apr_table_get(r->notes, "error-notes"); - ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, + ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(02656) "Error while reading HTTP trailer: %i%s%s", r->status, error_notes ? ": " : "", error_notes ? error_notes : ""); diff --git a/modules/ldap/util_ldap.c b/modules/ldap/util_ldap.c index 7440d9eb9d7..40dbb9d9f74 100644 --- a/modules/ldap/util_ldap.c +++ b/modules/ldap/util_ldap.c @@ -374,7 +374,7 @@ static int uldap_connection_init(request_rec *r, if (ldc->ChaseReferrals != AP_LDAP_CHASEREFERRALS_SDKDEFAULT) { /* Set options for rebind and referrals. */ - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01278) + ap_log_error(APLOG_MARK, APLOG_TRACE4, 0, r->server, APLOGNO(01278) "LDAP: Setting referrals to %s.", ((ldc->ChaseReferrals == AP_LDAP_CHASEREFERRALS_ON) ? "On" : "Off")); apr_ldap_set_option(r->pool, ldc->ldap, diff --git a/modules/proxy/balancers/mod_lbmethod_bybusyness.c b/modules/proxy/balancers/mod_lbmethod_bybusyness.c index 9185f22fc43..67d53a3551e 100644 --- a/modules/proxy/balancers/mod_lbmethod_bybusyness.c +++ b/modules/proxy/balancers/mod_lbmethod_bybusyness.c @@ -28,7 +28,6 @@ static int (*ap_proxy_retry_worker_fn)(const char *proxy_function, static proxy_worker *find_best_bybusyness(proxy_balancer *balancer, request_rec *r) { - int i; proxy_worker **worker; proxy_worker *mycandidate = NULL; @@ -116,11 +115,11 @@ static proxy_worker *find_best_bybusyness(proxy_balancer *balancer, } return mycandidate; - } /* assumed to be mutex protected by caller */ -static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { +static apr_status_t reset(proxy_balancer *balancer, server_rec *s) +{ int i; proxy_worker **worker; worker = (proxy_worker **)balancer->workers->elts; @@ -131,8 +130,9 @@ static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } -static apr_status_t age(proxy_balancer *balancer, server_rec *s) { - return APR_SUCCESS; +static apr_status_t age(proxy_balancer *balancer, server_rec *s) +{ + return APR_SUCCESS; } static const proxy_balancer_method bybusyness = @@ -144,7 +144,6 @@ static const proxy_balancer_method bybusyness = &age }; - static void register_hook(apr_pool_t *p) { ap_register_provider(p, PROXY_LBMETHOD, "bybusyness", "0", &bybusyness); diff --git a/modules/proxy/balancers/mod_lbmethod_byrequests.c b/modules/proxy/balancers/mod_lbmethod_byrequests.c index 015de12ad64..206fe9216b5 100644 --- a/modules/proxy/balancers/mod_lbmethod_byrequests.c +++ b/modules/proxy/balancers/mod_lbmethod_byrequests.c @@ -149,7 +149,8 @@ static proxy_worker *find_best_byrequests(proxy_balancer *balancer, } /* assumed to be mutex protected by caller */ -static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { +static apr_status_t reset(proxy_balancer *balancer, server_rec *s) +{ int i; proxy_worker **worker; worker = (proxy_worker **)balancer->workers->elts; @@ -159,8 +160,9 @@ static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } -static apr_status_t age(proxy_balancer *balancer, server_rec *s) { - return APR_SUCCESS; +static apr_status_t age(proxy_balancer *balancer, server_rec *s) +{ + return APR_SUCCESS; } /* diff --git a/modules/proxy/balancers/mod_lbmethod_bytraffic.c b/modules/proxy/balancers/mod_lbmethod_bytraffic.c index ee2451555f6..b3fe556a550 100644 --- a/modules/proxy/balancers/mod_lbmethod_bytraffic.c +++ b/modules/proxy/balancers/mod_lbmethod_bytraffic.c @@ -115,14 +115,14 @@ static proxy_worker *find_best_bytraffic(proxy_balancer *balancer, ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, APLOGNO(01210) "proxy: bytraffic selected worker \"%s\" : busy %" APR_SIZE_T_FMT, mycandidate->s->name, mycandidate->s->busy); - } return mycandidate; } /* assumed to be mutex protected by caller */ -static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { +static apr_status_t reset(proxy_balancer *balancer, server_rec *s) +{ int i; proxy_worker **worker; worker = (proxy_worker **)balancer->workers->elts; @@ -135,8 +135,9 @@ static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { return APR_SUCCESS; } -static apr_status_t age(proxy_balancer *balancer, server_rec *s) { - return APR_SUCCESS; +static apr_status_t age(proxy_balancer *balancer, server_rec *s) +{ + return APR_SUCCESS; } static const proxy_balancer_method bytraffic = diff --git a/modules/proxy/balancers/mod_lbmethod_heartbeat.c b/modules/proxy/balancers/mod_lbmethod_heartbeat.c index e9e1034405a..0a4d961ebb7 100644 --- a/modules/proxy/balancers/mod_lbmethod_heartbeat.c +++ b/modules/proxy/balancers/mod_lbmethod_heartbeat.c @@ -342,12 +342,14 @@ static proxy_worker *find_best_hb(proxy_balancer *balancer, return mycandidate; } -static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { - return APR_SUCCESS; +static apr_status_t reset(proxy_balancer *balancer, server_rec *s) +{ + return APR_SUCCESS; } -static apr_status_t age(proxy_balancer *balancer, server_rec *s) { - return APR_SUCCESS; +static apr_status_t age(proxy_balancer *balancer, server_rec *s) +{ + return APR_SUCCESS; } static const proxy_balancer_method heartbeat = @@ -360,7 +362,7 @@ static const proxy_balancer_method heartbeat = }; static int lb_hb_init(apr_pool_t *p, apr_pool_t *plog, - apr_pool_t *ptemp, server_rec *s) + apr_pool_t *ptemp, server_rec *s) { apr_size_t size; unsigned int num; diff --git a/modules/proxy/examples/mod_lbmethod_rr.c b/modules/proxy/examples/mod_lbmethod_rr.c index adb28d8e24d..8ad3c526c6d 100644 --- a/modules/proxy/examples/mod_lbmethod_rr.c +++ b/modules/proxy/examples/mod_lbmethod_rr.c @@ -99,12 +99,14 @@ static proxy_worker *find_best_roundrobin(proxy_balancer *balancer, return mycandidate; } -static apr_status_t reset(proxy_balancer *balancer, server_rec *s) { - return APR_SUCCESS; +static apr_status_t reset(proxy_balancer *balancer, server_rec *s) +{ + return APR_SUCCESS; } -static apr_status_t age(proxy_balancer *balancer, server_rec *s) { - return APR_SUCCESS; +static apr_status_t age(proxy_balancer *balancer, server_rec *s) +{ + return APR_SUCCESS; } static const proxy_balancer_method roundrobin = @@ -116,7 +118,6 @@ static const proxy_balancer_method roundrobin = &age }; - static void ap_proxy_rr_register_hook(apr_pool_t *p) { ap_register_provider(p, PROXY_LBMETHOD, "roundrobin", "0", &roundrobin); diff --git a/modules/proxy/mod_proxy_fcgi.c b/modules/proxy/mod_proxy_fcgi.c index fbccd108b74..4a06fd133ef 100644 --- a/modules/proxy/mod_proxy_fcgi.c +++ b/modules/proxy/mod_proxy_fcgi.c @@ -283,17 +283,15 @@ static apr_status_t send_environment(proxy_conn_rec *conn, request_rec *r, envarr = apr_table_elts(r->subprocess_env); elts = (const apr_table_entry_t *) envarr->elts; -#ifdef FCGI_DUMP_ENV_VARS - { + if (APLOGrtrace8(r)) { int i; for (i = 0; i < envarr->nelts; ++i) { - ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01062) + ap_log_rerror(APLOG_MARK, APLOG_TRACE8, 0, r, APLOGNO(01062) "sending env var '%s' value '%s'", elts[i].key, elts[i].val); } } -#endif /* Send envvars over in as many FastCGI records as it takes, */ next_elem = 0; /* starting with the first one */ @@ -573,10 +571,8 @@ static apr_status_t dispatch(proxy_conn_rec *conn, proxy_dir_conf *conf, break; } -#ifdef FCGI_DUMP_HEADERS - ap_log_rdata(APLOG_MARK, APLOG_DEBUG, r, "FastCGI header", + ap_log_rdata(APLOG_MARK, APLOG_TRACE8, r, "FastCGI header", farray, AP_FCGI_HEADER_LEN, 0); -#endif ap_fcgi_header_fields_from_array(&version, &type, &rid, &clen, &plen, farray); diff --git a/modules/ssl/mod_ssl.c b/modules/ssl/mod_ssl.c index 63852d076e9..8d47d1f0ebd 100644 --- a/modules/ssl/mod_ssl.c +++ b/modules/ssl/mod_ssl.c @@ -270,7 +270,7 @@ static const command_rec ssl_config_cmds[] = { #ifdef HAVE_SSL_CONF_CMD SSL_CMD_SRV(OpenSSLConfCmd, TAKE2, - "OpenSSL configuration command") + "OpenSSL configuration command") #endif /* Deprecated directives. */ diff --git a/server/log.c b/server/log.c index 35f4f2ba305..03de91a2b2e 100644 --- a/server/log.c +++ b/server/log.c @@ -1405,7 +1405,7 @@ static void fmt_data(unsigned char *buf, const void *vdata, apr_size_t len, apr_ unsigned char c = data[*off]; if (apr_isprint(c) - && c != '\\') { /* backslash will be escaped later, which throws + && c != '\\') { /* backslash will be escaped later, which throws * off the formatting */ *chars = c; diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index bb427d17530..ebdbe2ae202 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -883,7 +883,7 @@ AP_DECLARE(const char *) ap_expr_str_exec_re(request_rec *r, { ap_expr_eval_ctx_t ctx; int dont_vary, rc; - const char *tmp_source = NULL, *vary_this = NULL; + const char *tmp_source, *vary_this; ap_regmatch_t tmp_pmatch[AP_MAX_REG_MATCH]; const char *result; @@ -895,6 +895,9 @@ AP_DECLARE(const char *) ap_expr_str_exec_re(request_rec *r, return (const char *)info->root_node->node_arg1; } + tmp_source = NULL; + vary_this = NULL; + dont_vary = (info->flags & AP_EXPR_FLAG_DONT_VARY); ctx.r = r;