Commit 755dd84e authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1681694, r1682907 from trunk:

mod_proxy: Don't put the worker in error state for 500 or 503 errors
returned by the backend unless failonstatus is configured to.  PR 56925.


mod_proxy: follow up to r1681694.

Handle the proxy-error-override note also in mod_proxy_ajp.

The note is not needed in mod_proxy_fcgi (which also handles
ProxyErrorOverride) since it calls ap_die() by itself, and always
returns OK to proxy_handler().

Add a comment about the note where used.

Submitted by: ylavic
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1683112 13f79535-47bb-0310-9956-ffa450edef68
parent ead6a79d
Loading
Loading
Loading
Loading
+4 −0
Changes for CHANGES: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -12,6 +12,10 @@ Changes with Apache 2.4.13
     calls r:wsupgrade() can cause a child process crash. 
     [Edward Lu <Chaosed0 gmail.com>]

  *) mod_proxy: Don't put the worker in error state for 500 or 503 errors
     returned by the backend unless failonstatus is configured to.  PR 56925.
     [Yann Ylavic]

  *) core: Don't lowercase the argument to SetHandler if it begins with
     "proxy:unix". PR 57968. [Eric Covener]

+0 −7
Changes for STATUS: 0 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -105,13 +105,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

  *) mod_proxy: Don't put the worker in error state for 500 or 503 errors
     returned by the backend unless failonstatus is configured to.  PR 56925.
     trunk patch: http://svn.apache.org/r1681694
     trunk patch: http://svn.apache.org/r1682907
     2.4.x patch: trunk works (modulo CHANGES)
     +1: ylavic, rjung, jim

   *) Easy patches - synch with trunk
        - mod_rewrite: Initialize args to not print garbage mem during a RewriteCond parse error
        - mod_rewrite: Initialize args to not print garbage mem during a RewriteRule parse error
+2 −1
Changes for modules/proxy/mod_proxy.c: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -1160,7 +1160,8 @@ static int proxy_handler(request_rec *r)
        AP_PROXY_RUN(r, worker, conf, url, attempts);
        access_status = proxy_run_scheme_handler(r, worker, conf,
                                                 url, NULL, 0);
        if (access_status == OK)
        if (access_status == OK
                || apr_table_get(r->notes, "proxy-error-override"))
            break;
        else if (access_status == HTTP_INTERNAL_SERVER_ERROR) {
            /* Unrecoverable server error.
+5 −0
Changes for modules/proxy/mod_proxy_ajp.c: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -644,6 +644,11 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
             */
            rv = r->status;
            r->status = HTTP_OK;
            /*
             * prevent proxy_handler() from treating this as an
             * internal error.
             */
            apr_table_setn(r->notes, "proxy-error-override", "1");
        }
        else {
            rv = OK;
+5 −0
Changes for modules/proxy/mod_proxy_http.c: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1662,6 +1662,11 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
                }
                ap_discard_request_body(backend->r);
            }
            /*
             * prevent proxy_handler() from treating this as an
             * internal error.
             */
            apr_table_setn(r->notes, "proxy-error-override", "1");
            return proxy_status;
        }