]> granicus.if.org Git - apache/commitdiff
Fix so that errordocument works when a error gets returned from the
authorIan Holsman <ianh@apache.org>
Mon, 5 Nov 2001 23:06:55 +0000 (23:06 +0000)
committerIan Holsman <ianh@apache.org>
Mon, 5 Nov 2001 23:06:55 +0000 (23:06 +0000)
proxy.
Problem was ErrorHandler thought it was in some kind of recursion and
couldn't find the custom error document
Obtained from: Jin Hong <jinh@cnet.com>
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

index 7687fbe4cc06c7edf1423d17ab6c6aac98707442..cda1263eceab550ada4f76c01691da9f45628d95 100644 (file)
@@ -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;
 }