diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index f7f331b52f..99aec61153 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -940,7 +940,7 @@ static const command_rec proxy_cmds[] = "A list of ports which CONNECT may connect to"), AP_INIT_TAKE1("ProxyVia", set_via_opt, NULL, RSRC_CONF, "Configure Via: proxy header header to one of: on | off | block | full"), - AP_INIT_FLAG("HTTPProxyOverrideReturnedErrors", set_http_proxy_override_error, NULL, RSRC_CONF, + AP_INIT_FLAG("ProxyHTTPOverrideReturnedErrors", set_http_proxy_override_error, NULL, RSRC_CONF, "use our error handling pages instead of the servers we are proxying"), {NULL} }; diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index 3730e5b4e0..6540933cc1 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -860,9 +860,13 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r, } } - if ( conf->HTTPOverrideErrors ) - return r->status; - else + if ( conf->HTTPOverrideErrors ) { + /* 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 return OK; }