Commit 45731f2a authored by Ian Holsman's avatar Ian Holsman
Browse files

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 <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
parent 03c1d63c
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -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;
}