From: Nick Kew Date: Thu, 30 Aug 2007 23:06:00 +0000 (+0000) Subject: mod_proxy: Add Proxypass status option to ignore errors X-Git-Tag: 2.3.0~1499 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8de9bb913ec47c6ec080128f77ca767d049d1014;p=apache mod_proxy: Add Proxypass status option to ignore errors PR 43167. Patch by Francisco Gimeno git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@571338 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 43b5934364..b6ae84446e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes with Apache 2.3.0 + *) mod_proxy: enable Ignore Errors option on ProxyPass Status. + PR 43167 [Francisco Gimeno + *) mod_proxy_http: Don't try to read body of a HEAD request before responding. PR 41644 [Stuart Children ] diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml index 7b8ab2e0fa..813ee2117c 100644 --- a/docs/manual/mod/mod_proxy.xml +++ b/docs/manual/mod/mod_proxy.xml @@ -719,9 +719,10 @@ expressions status - Single letter value defining the initial status of - this worker: 'D' is disabled, 'S' is stopped, 'H' is hot-standby - and 'E' is in an error state. Status can be set (which is the default) - by prepending with '+' or cleared by prepending with '-'. + this worker: 'D' is disabled, 'S' is stopped, 'I' is ignore-errors, + 'H' is hot-standby and 'E' is in an error state. Status + can be set (which is the default) by prepending with '+' or + cleared by prepending with '-'. Thus, a setting of 'S-E' sets this worker to Stopped and clears the in-error flag. diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 73a69aa9a8..df613fe2fe 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -220,6 +220,12 @@ static const char *set_worker_param(apr_pool_t *p, else worker->status &= ~PROXY_WORKER_HOT_STANDBY; } + else if (*v == 'I' || *v == 'i') { + if (mode) + worker->status |= PROXY_WORKER_IGNORE_ERRORS; + else + worker->status &= ~PROXY_WORKER_IGNORE_ERRORS; + } else { return "Unknown status parameter option"; }