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
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]
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
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.
*/
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;
}
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;
}