Bug 60038 - params hcuri and hcexpr are ignored
Summary: params hcuri and hcexpr are ignored
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_proxy_hcheck (show other bugs)
Version: 2.4.23
Hardware: Sun Solaris
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: FixedInTrunk, PatchAvailable
Depends on:
Blocks:
 
Reported: 2016-08-24 13:22 UTC by zdeno
Modified: 2016-11-14 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zdeno 2016-08-24 13:22:32 UTC
Parameters hcuri and hcexpr are ignored.

from configuration file:
- - - - 8< - - - - - - - - - - - - - - - 
ProxyHCExpr is_up {%{REQUEST_STATUS} !~ /^[5]/}

<Proxy balancer://some_services>
  BalancerMember http://server1:port hcmethod=GET hcexpr=is_up hcinterval=5 hcuri=/services/service1
  BalancerMember http://server2:port hcmethod=GET hcexpr=is_up hcinterval=5 hcuri=/services/service1

  ...
</Proxy>
- - - - 8< - - - - - - - - - - - - - - - 


In error_log on BalanceMember you can see:
... [error] [client ip.ad.dr.es] Invalid URI in request GET  HTTP/1.0


Possible patch:
--- modules/proxy/mod_proxy_hcheck.c-old       Wed Aug 24 07:30:38 2016
+++ modules/proxy/mod_proxy_hcheck.c    Wed Aug 24 13:04:32 2016
@@ -426,6 +426,8 @@
         PROXY_STRNCPY(hc->s->name,     wptr);
         PROXY_STRNCPY(hc->s->hostname, worker->s->hostname);
         PROXY_STRNCPY(hc->s->scheme,   worker->s->scheme);
+        PROXY_STRNCPY(hc->s->hcuri,    worker->s->hcuri);
+        PROXY_STRNCPY(hc->s->hcexpr,   worker->s->hcexpr);
         hc->hash.def = hc->s->hash.def = ap_proxy_hashfunc(hc->s->name, PROXY_HASHFUNC_DEFAULT);
         hc->hash.fnv = hc->s->hash.fnv = ap_proxy_hashfunc(hc->s->name, PROXY_HASHFUNC_FNV);
         hc->s->port = port;
Comment 1 Ruediger Pluem 2016-08-25 11:39:00 UTC
Thanks for the patch. Committed to trunk as r1757662.
Comment 2 Ruediger Pluem 2016-08-25 11:47:43 UTC
Backport for 2.4. proposed in r1757664.
Comment 3 Yann Ylavic 2016-11-14 12:18:11 UTC
Backported to 2.4.24 in r1758373.