From f1c45242cad5c417c06b4e6cbc4dc587d12a4dfe Mon Sep 17 00:00:00 2001 From: Ian Holsman Date: Mon, 5 Nov 2001 23:06:55 +0000 Subject: [PATCH] Fix so that errordocument works when a error gets returned from the proxy. Problem was ErrorHandler thought it was in some kind of recursion and couldn't find the custom error document Obtained from: Jin Hong Submitted by: Reviewed by: Ian Holsman git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91757 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/proxy_http.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index 7687fbe4cc..cda1263ece 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -857,8 +857,15 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, /* the code above this checks for 'OK' which is what the hook expects */ if ( r->status == HTTP_OK ) return OK; - else - return r->status; + else { + /* clear r->status for override error, otherwise ErrorDocument + * thinks that this is a recursive error, and doesn't find the + * custom error page + */ + int status = r->status; + r->status = HTTP_OK; + return status; + } } else return OK; } -- 2.50.1