1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-07 04:02:58 +03:00

* Do not overwrite r->status with access_status if access_status is OK or DONE

as in this case r->status might contain the true response code.

PR: 59869


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1753592 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ruediger Pluem
2016-07-20 18:25:01 +00:00
parent eee5bc3f1f
commit fb8aa91094
2 changed files with 20 additions and 9 deletions

View File

@@ -1,6 +1,9 @@
-*- coding: utf-8 -*- -*- coding: utf-8 -*-
Changes with Apache 2.5.0 Changes with Apache 2.5.0
*) mo_proxy: Correctly consider error response codes by the backend when
processing failonstatus. PR 59869 [Ruediger Pluem]
*) mod_http2: new H2CopyFiles directive that changes treatment of file *) mod_http2: new H2CopyFiles directive that changes treatment of file
handles in responses. Necessary in order to fix broken lifetime handling handles in responses. Necessary in order to fix broken lifetime handling
in modules such as mod_wsgi. in modules such as mod_wsgi.

View File

@@ -1273,7 +1273,11 @@ cleanup:
* the error page on the proxy or if the error was not generated by the * the error page on the proxy or if the error was not generated by the
* backend itself but by the proxy e.g. a bad gateway) in order to give * backend itself but by the proxy e.g. a bad gateway) in order to give
* ap_proxy_post_request a chance to act correctly on the status code. * ap_proxy_post_request a chance to act correctly on the status code.
* But only do the above if access_status is not OK and not DONE, because
* in this case r->status might contain the true status and overwriting
* it with OK or DONE would be wrong.
*/ */
if ((access_status != OK) && (access_status != DONE)) {
saved_status = r->status; saved_status = r->status;
r->status = access_status; r->status = access_status;
ap_proxy_post_request(worker, balancer, r, conf); ap_proxy_post_request(worker, balancer, r, conf);
@@ -1284,6 +1288,10 @@ cleanup:
if (r->status == access_status) { if (r->status == access_status) {
r->status = saved_status; r->status = saved_status;
} }
}
else {
ap_proxy_post_request(worker, balancer, r, conf);
}
proxy_run_request_status(&access_status, r); proxy_run_request_status(&access_status, r);
AP_PROXY_RUN_FINISHED(r, attempts, access_status); AP_PROXY_RUN_FINISHED(r, attempts, access_status);