Commit fd0648f2 authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1418761, r1418765, r1510295, r1757147, r1805163, r1818924, r1827374,...

Merge r1418761, r1418765, r1510295, r1757147, r1805163, r1818924, r1827374, r1831772, r1832351, r1832951, r1815004 from trunk:

Don't claim "BIO dump follows" if it is not logged due to log level config.


make ssl_io_data_dump respect per-conn loglevel


add high trace level log messages for debugging buffering and write completion


* modules/ssl/ssl_engine_kernel.c (ssl_callback_SessionTicket): Fail
  if RAND_bytes() fails; possible per API, although not in practice
  with the OpenSSL implementation.


Fix typo in log message.


ap_add_common_vars(): use apr_pstrmemdup().

This avoids a transient replacement/restore of '?' by '\0' in r->filename.


Use 'ap_request_has_body()' instead of duplicating its implemenation.

The logic in 'ap_request_has_body()' is:
    has_body = (!r->header_only
                && (r->kept_body
                    || apr_table_get(r->headers_in, "Transfer-Encoding")
                    || ( (cls = apr_table_get(r->headers_in, "Content-Length"))
                        && (apr_strtoff(&cl, cls, &estr, 10) == APR_SUCCESS)
                        && (!*estr)
                        && (cl > 0) )
                    )
                );
So the test is slighly different from the original code. (but this looks fine to me)

This also has the advantage to avoid a redundant call to 'apr_table_get()' and to improve readability.

While at it, move the test '!r->expecting_100' a few lines above because it is cheap.

PR62368: Print the unparsed URI in AH03454

... to include r->args and get otherwise get as close to possible to
what came in over the wire.

Submitted By: Hank Ibell <hwibell gmail.com>
Committed By: covener




All error handling paths of this function call 'apr_brigade_destroy()' , except this one.
So add it here too.

Probably spotted with the help of the Coccinelle software (Thx Julia for the patch and for Coccinelle)

See PR 53016

* modules/proxy/proxy_util.c (ap_proxy_share_worker): Skip creating subpool
  for debugging unless debug-level logging is enabled.  No functional change.


mod_watchdog: Correct some log messages and fix
compiler warning
"'rv' may be used uninitialized in this function".

Follow up to r1722154.

Submitted by: sf, jorton, jorton, ylavic, jailletc36, covener, jailletc36, jorton, rjung
Reviewed by: jailletc36, jim, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1838103 13f79535-47bb-0310-9956-ffa450edef68
parent 700b1c2a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5,6 +5,8 @@ Changes with Apache 2.4.35
     and <IfModule> to be quoted.  This is primarily for the benefit of
     <IfFile>. [Eric Covener]

  *) mod_watchdog: Correct some log messages.  [Rainer Jung]

  *) mod_md: When the last domain name from an MD is moved to another one,
     that now empty MD gets moved to the store archive. PR 62572. 
     [Stefan Eissing]
+0 −26
Original line number Diff line number Diff line
@@ -124,32 +124,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
     - mod_ssl: Tweak logging message
     - mod_ssl: make ssl_io_data_dump respect per-conn loglevel
     - mod_ssl: adjust log level
     - mod_ssl: handle RAND_bytes() failures (API changed in OpenSSL 0.9.5 and httpd needs >= 0.9.8a)
     - mod_ssl: fix typo
     - core: Simplify code
     - mod_ssl: simplify code
     - core: Print the unparsed URI in AH03454
     - mod_proxy_ajp: release some resources on an error handling pah
     - mod_proxy: Skip creating subpool for debugging unless debug-level logging is enabled
     - mod_watchdog: Correct some log messages and fix compiler warning
     trunk patch: http://svn.apache.org/r1418761
                  http://svn.apache.org/r1418765
                  http://svn.apache.org/r1510295
                  http://svn.apache.org/r1757147
                  http://svn.apache.org/r1805163
                  http://svn.apache.org/r1818924
                  http://svn.apache.org/r1827374
                  http://svn.apache.org/r1831772
                  http://svn.apache.org/r1832351
                  http://svn.apache.org/r1832951
                  http://svn.apache.org/r1815004
     2.4.x patch: trunk patches work, minus CHANGES and next-number in the last commit (r1815004)
                  svn merge -c 1418761,1418765,1510295,1757147,1805163,1818924,1827374,1831772,1832351,1832951,1815004 ^/httpd/httpd/trunk . 
     +1: jailletc36, jim, jorton

PATCHES PROPOSED TO BACKPORT FROM TRUNK:
  [ New proposals should be added at the end of the list ]
+6 −4
Original line number Diff line number Diff line
@@ -534,11 +534,13 @@ static int wd_post_config_hook(apr_pool_t *pconf, apr_pool_t *plog,
                                                  w->name, s,
                                                  wd_server_conf->pool, 0);
                        if (rv != APR_SUCCESS) {
                            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(10095)
                                         "Watchdog: Failed to create singleton mutex.");
                            return rv;
                        }
                    }
                        ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(02979)
                            "Watchdog: Created child worker thread (%s).", w->name);
                                "Watchdog: Created singleton mutex (%s).", w->name);
                    }
                    wd_server_conf->child_workers++;
                }
            }
@@ -580,12 +582,12 @@ static void wd_child_init_hook(apr_pool_t *p, server_rec *s)
                 */
                if ((rv = wd_startup(w, wd_server_conf->pool)) != APR_SUCCESS) {
                    ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, APLOGNO(01573)
                                 "Watchdog: Failed to create worker thread.");
                                 "Watchdog: Failed to create child worker thread.");
                    /* No point to continue */
                    return;
                }
                ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(02981)
                             "Watchdog: Created worker thread (%s).", wn[i].provider_name);
                             "Watchdog: Created child worker thread (%s).", wn[i].provider_name);
            }
        }
    }
+1 −0
Original line number Diff line number Diff line
@@ -322,6 +322,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
             * Close it to clean things up.
             */
            conn->close = 1;
            apr_brigade_destroy(input_brigade);
            return HTTP_BAD_REQUEST;
        }
    }
+2 −1
Original line number Diff line number Diff line
@@ -1879,7 +1879,8 @@ PROXY_DECLARE(apr_status_t) ap_proxy_share_worker(proxy_worker *worker, proxy_wo
    }
    worker->s = shm;
    worker->s->index = i;
    {

    if (APLOGdebug(ap_server_conf)) {
        apr_pool_t *pool;
        apr_pool_create(&pool, ap_server_conf->process->pool);
        ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, ap_server_conf, APLOGNO(02338)
Loading