From ae877f9e70f05aceae6d78cb53be3e3c6bb6a3cd Mon Sep 17 00:00:00 2001 From: Ian Holsman Date: Wed, 26 Sep 2001 19:58:10 +0000 Subject: [PATCH] change command name so that it starts with 'Proxy' fix the command so that it returns 'OK' instead of 'HTTP_OK' PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91155 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy.c | 2 +- modules/proxy/proxy_http.c | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) 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; }