]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Easy patches: synch 2.4.x and trunk
authorGraham Leggett <minfrin@apache.org>
Mon, 27 May 2019 12:37:34 +0000 (12:37 +0000)
committerGraham Leggett <minfrin@apache.org>
Mon, 27 May 2019 12:37:34 +0000 (12:37 +0000)
   - 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

CHANGES
STATUS
include/httpd.h
modules/http/http_core.c
modules/http/mod_mime.c
modules/metadata/mod_headers.c
modules/proxy/ajp_header.c
modules/proxy/mod_proxy_balancer.c
server/scoreboard.c
server/util_expr_eval.c
support/suexec.c

diff --git a/CHANGES b/CHANGES
index e4b8d7ec910a6f5c74a5c50841caebef675bf003..89a74c5e4845110448897b1b11c31d7d04b189bf 100644 (file)
--- 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 8223422be6c624501254f0f5905dea1f33c6a29e..b455e1881acf8d81755591167b2697c50304a3f5 100644 (file)
--- 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 ]
index 99f7f041aeafe7a64b89ffeed76a76203f2c114e..1962ad26cab4e278311a6fa347886279da64e782 100644 (file)
@@ -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
index 31d7a389db9a8d4aa41e47bd43e2520e5319483a..3b6b0b759929601bfbf3e3aa16ff8b0776189335 100644 (file)
@@ -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
index 28c53be132b455a5a31572d4a934705c68fbf7b9..03d1c4110b66d367efdf8ae198ec20474b76f559 100644 (file)
@@ -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;
     }
index 1ea970d78013853132f992054d70d84a67f90293..82d0045414e8d4fd8af19af060f0c13c10698b39 100644 (file)
@@ -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.
index 67353a70e4cf1baa0469370bd4c3fc411bd70877..ab1092e95a0de01771aa1bcbdd2d7ed4d61bf92b 100644 (file)
@@ -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';
index c59f5e973fc7ca825f9e7cdd340dc07ae1f507af..57756c744bbf11bbdf7dd2cd7c2d4121092e60b6 100644 (file)
@@ -1805,7 +1805,7 @@ static int balancer_handler(request_rec *r)
                 ap_rprintf(r, "<tr><td>Fails trigger)</td><td><input name='w_hf' id='w_hf' type='text'"
                            "value='%d'></td></tr>\n", wsel->s->fails);
                 ap_rprintf(r, "<tr><td>HC uri</td><td><input name='w_hu' id='w_hu' type='text'"
-                        "value='%s'</td></tr>\n", ap_escape_html(r->pool, wsel->s->hcuri));
+                           "value='%s'></td></tr>\n", ap_escape_html(r->pool, wsel->s->hcuri));
                 ap_rputs("</table>\n</td></tr>\n", r);
             }
             ap_rputs("<tr><td colspan='2'><input type=submit value='Submit'></td></tr>\n", r);
@@ -1846,6 +1846,7 @@ static int balancer_handler(request_rec *r)
             ap_rprintf(r, "value='%d'></td></tr>\n", bsel->s->max_attempts);
             ap_rputs("<tr><td>Disable Failover:</td>", r);
             create_radio("b_sforce", bsel->s->sticky_force, r);
+            ap_rputs("</tr>\n", r);
             ap_rputs("<tr><td>Sticky Session:</td><td><input name='b_ss' id='b_ss' size=64 type=text ", r);
             if (strcmp(bsel->s->sticky, bsel->s->sticky_path)) {
                 ap_rvputs(r, "value ='", bsel->s->sticky, " | ",
index 4ac862a94eb74fcb9018c1fa34a706e1a27a32be..b40b45df5900be62b0d48c3fe2330e0d51ce18f1 100644 (file)
@@ -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;
 
index 0f92f416c75343b698e2636e2d2e40c8264cf654..7d41fff9abd823c04e2cd86b7b2a9149858fe7a6 100644 (file)
@@ -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
index 0b52495b40dcaa820121f2abddbddf7eaeb2824a..e2a2558d41eefc663da54523cd92833e393b04cb 100644 (file)
@@ -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);