From: Graham Leggett Date: Mon, 27 May 2019 12:37:34 +0000 (+0000) Subject: Easy patches: synch 2.4.x and trunk X-Git-Tag: 2.4.40~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1efc485fd90c37740ed9a9f588ea4ee05df75e3b;p=thirdparty%2Fapache%2Fhttpd.git Easy patches: synch 2.4.x and trunk - core: 80 chars - http_core: Clean-uo and style. No functional change overall - http_core: One more style fix in ap_process_http_async_connection() - mod_mime: Fix a cppcheck warning - mod_proxy_ajp: Fix a harmless clang warning - suexec: avoid a potential sprintf overflow - mod_headers: This is harmless, but this really should be an 'echo_do *' - core: Fix typo - core: Update a comment about the 'PATCH' HTTP command - mod_proxy_balancer: Fix some HTML syntax issues trunk patch: - http://svn.apache.org/r1780282 - http://svn.apache.org/r1814659 - http://svn.apache.org/r1814660 - http://svn.apache.org/r1838285 - http://svn.apache.org/r1842881 - http://svn.apache.org/r1846253 - http://svn.apache.org/r1853757 - http://svn.apache.org/r1851702 - http://svn.apache.org/r1853980 - http://svn.apache.org/r1855614 2.4.x patch: svn merge -c 1780282,1814659,1814660,1838285,1842881,1846253,1853757,1851702,1853980,1855614 ^/httpd/httpd/trunk . +1: jailletc36, jim, rjung git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1860129 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index e4b8d7ec910..89a74c5e484 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,19 @@ -*- coding: utf-8 -*- Changes with Apache 2.4.40 + *) Easy patches: synch 2.4.x and trunk + - core: 80 chars + - http_core: Clean-uo and style. No functional change overall + - http_core: One more style fix in ap_process_http_async_connection() + - mod_mime: Fix a cppcheck warning + - mod_proxy_ajp: Fix a harmless clang warning + - suexec: avoid a potential sprintf overflow + - mod_headers: This is harmless, but this really should be an 'echo_do *' + - core: Fix typo + - core: Update a comment about the 'PATCH' HTTP command + - mod_proxy_balancer: Fix some HTML syntax issues + [Christophe Jaillet] + *) When using mod_status with the Event MPM, report the number of requests associated with an active connection in the "ACC" field. Previously zero was always reported with this MPM. PR60647. [Eric Covener] diff --git a/STATUS b/STATUS index 8223422be6c..b455e1881ac 100644 --- a/STATUS +++ b/STATUS @@ -127,31 +127,6 @@ RELEASE SHOWSTOPPERS: PATCHES ACCEPTED TO BACKPORT FROM TRUNK: [ start all new proposals below, under PATCHES PROPOSED. ] - *) Easy patches: synch 2.4.x and trunk - - core: 80 chars - - http_core: Clean-uo and style. No functional change overall - - http_core: One more style fix in ap_process_http_async_connection() - - mod_mime: Fix a cppcheck warning - - mod_proxy_ajp: Fix a harmless clang warning - - suexec: avoid a potential sprintf overflow - - mod_headers: This is harmless, but this really should be an 'echo_do *' - - core: Fix typo - - core: Update a comment about the 'PATCH' HTTP command - - mod_proxy_balancer: Fix some HTML syntax issues - trunk patch: - - http://svn.apache.org/r1780282 - - http://svn.apache.org/r1814659 - - http://svn.apache.org/r1814660 - - http://svn.apache.org/r1838285 - - http://svn.apache.org/r1842881 - - http://svn.apache.org/r1846253 - - http://svn.apache.org/r1853757 - - http://svn.apache.org/r1851702 - - http://svn.apache.org/r1853980 - - http://svn.apache.org/r1855614 - 2.4.x patch: svn merge -c 1780282,1814659,1814660,1838285,1842881,1846253,1853757,1851702,1853980,1855614 ^/httpd/httpd/trunk . - +1: jailletc36, jim, rjung - jailletc36: this series relies on r1780280 backport (see above) PATCHES PROPOSED TO BACKPORT FROM TRUNK: [ New proposals should be added at the end of the list ] diff --git a/include/httpd.h b/include/httpd.h index 99f7f041aea..1962ad26cab 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -595,7 +595,7 @@ AP_DECLARE(const char *) ap_get_server_built(void); #define M_CONNECT 4 #define M_OPTIONS 5 #define M_TRACE 6 /** RFC 2616: HTTP */ -#define M_PATCH 7 /** no rfc(!) ### remove this one? */ +#define M_PATCH 7 /** RFC 5789: PATCH Method for HTTP */ #define M_PROPFIND 8 /** RFC 2518: WebDAV */ #define M_PROPPATCH 9 /* : */ #define M_MKCOL 10 diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 31d7a389db9..3b6b0b75992 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -140,17 +140,20 @@ static int ap_process_http_async_connection(conn_rec *c) AP_DEBUG_ASSERT(cs != NULL); AP_DEBUG_ASSERT(cs->state == CONN_STATE_READ_REQUEST_LINE); - while (cs->state == CONN_STATE_READ_REQUEST_LINE) { + if (cs->state == CONN_STATE_READ_REQUEST_LINE) { ap_update_child_status_from_conn(c->sbh, SERVER_BUSY_READ, c); - if (ap_extended_status) ap_set_conn_count(c->sbh, r, c->keepalives); + if (ap_extended_status) { + ap_set_conn_count(c->sbh, r, c->keepalives); + } if ((r = ap_read_request(c))) { - c->keepalive = AP_CONN_UNKNOWN; /* process the request if it was read without error */ if (r->status == HTTP_OK) { cs->state = CONN_STATE_HANDLER; - if (ap_extended_status) ap_set_conn_count(c->sbh, r, c->keepalives+1); + if (ap_extended_status) { + ap_set_conn_count(c->sbh, r, c->keepalives + 1); + } ap_update_child_status(c->sbh, SERVER_BUSY_WRITE, r); ap_process_async_request(r); /* After the call to ap_process_request, the diff --git a/modules/http/mod_mime.c b/modules/http/mod_mime.c index 28c53be132b..03d1c4110b6 100644 --- a/modules/http/mod_mime.c +++ b/modules/http/mod_mime.c @@ -989,9 +989,7 @@ static int find_ct(request_rec *r) if (!r->content_languages && conf->default_language) { const char **new; - if (!r->content_languages) { - r->content_languages = apr_array_make(r->pool, 2, sizeof(char *)); - } + r->content_languages = apr_array_make(r->pool, 2, sizeof(char *)); new = (const char **)apr_array_push(r->content_languages); *new = conf->default_language; } diff --git a/modules/metadata/mod_headers.c b/modules/metadata/mod_headers.c index 1ea970d7801..82d0045414e 100644 --- a/modules/metadata/mod_headers.c +++ b/modules/metadata/mod_headers.c @@ -668,7 +668,7 @@ static const char *process_regexp(header_entry *hdr, const char *value, static int echo_header(void *v, const char *key, const char *val) { - edit_do *ed = v; + echo_do *ed = (echo_do *)v; /* If the input header (key) matches the regex, echo it intact to * r->headers_out. diff --git a/modules/proxy/ajp_header.c b/modules/proxy/ajp_header.c index 67353a70e4c..ab1092e95a0 100644 --- a/modules/proxy/ajp_header.c +++ b/modules/proxy/ajp_header.c @@ -59,6 +59,7 @@ static int sc_for_req_header(const char *header_name) if (len < 4 || len > 15) return UNKNOWN_METHOD; + memset(header, 0, sizeof header); while (*p) header[i++] = apr_toupper(*p++); header[i] = '\0'; diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index c59f5e973fc..57756c744bb 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -1805,7 +1805,7 @@ static int balancer_handler(request_rec *r) ap_rprintf(r, "Fails trigger)\n", wsel->s->fails); ap_rprintf(r, "HC uri\n", ap_escape_html(r->pool, wsel->s->hcuri)); + "value='%s'>\n", ap_escape_html(r->pool, wsel->s->hcuri)); ap_rputs("\n\n", r); } ap_rputs("\n", r); @@ -1846,6 +1846,7 @@ static int balancer_handler(request_rec *r) ap_rprintf(r, "value='%d'>\n", bsel->s->max_attempts); ap_rputs("Disable Failover:", r); create_radio("b_sforce", bsel->s->sticky_force, r); + ap_rputs("\n", r); ap_rputs("Sticky Session:s->sticky, bsel->s->sticky_path)) { ap_rvputs(r, "value ='", bsel->s->sticky, " | ", diff --git a/server/scoreboard.c b/server/scoreboard.c index 4ac862a94eb..b40b45df590 100644 --- a/server/scoreboard.c +++ b/server/scoreboard.c @@ -364,7 +364,8 @@ AP_DECLARE(int) ap_exists_scoreboard_image(void) return (ap_scoreboard_image ? 1 : 0); } -AP_DECLARE(void) ap_set_conn_count(ap_sb_handle_t *sb, request_rec *r, unsigned short conn_count) +AP_DECLARE(void) ap_set_conn_count(ap_sb_handle_t *sb, request_rec *r, + unsigned short conn_count) { worker_score *ws; diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index 0f92f416c75..7d41fff9abd 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -1791,7 +1791,7 @@ static int expr_lookup_not_found(ap_expr_lookup_parms *parms) type = "Binary operator"; break; default: - *parms->err = "Inavalid expression type in expr_lookup"; + *parms->err = "Invalid expression type in expr_lookup"; return !OK; } if ( parms->type == AP_EXPR_FUNC_OP_UNARY diff --git a/support/suexec.c b/support/suexec.c index 0b52495b40d..e2a2558d41e 100644 --- a/support/suexec.c +++ b/support/suexec.c @@ -223,7 +223,6 @@ static void log_no_err(const char *fmt,...) static void clean_env(void) { - char pathbuf[512]; char **cleanenv; char **ep; int cidx = 0; @@ -245,8 +244,7 @@ static void clean_env(void) exit(123); } - sprintf(pathbuf, "PATH=%s", AP_SAFE_PATH); - cleanenv[cidx] = strdup(pathbuf); + cleanenv[cidx] = strdup("PATH=" AP_SAFE_PATH); if (cleanenv[cidx] == NULL) { log_err("failed to malloc memory for environment\n"); exit(124);