Author: jfrederic.clere(a)jboss.com
Date: 2008-10-17 10:35:30 -0400 (Fri, 17 Oct 2008)
New Revision: 1962
Modified:
trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
Log:
Arrange domain handling...
Modified: trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c
===================================================================
--- trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-10-17 13:36:29 UTC
(rev 1961)
+++ trunk/mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c 2008-10-17 14:35:30 UTC
(rev 1962)
@@ -847,7 +847,7 @@
if (mycandidate) {
/* Failover in domain */
if (!checked_domain)
- apr_table_setn(r->notes, "session-domain_over", "1");
+ apr_table_setn(r->notes, "session-domain-ok", "1");
mycandidate->s->elected++;
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy: byrequests balancer DONE (%s)",
mycandidate->name);
@@ -1383,11 +1383,15 @@
/* Read the domain in case we have to make a failover */
rv = node_storage->find_node(&ou, *route);
if (rv == APR_SUCCESS) {
- ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
- "proxy: Found domain %s for %s", ou->mess.Domain,
*route);
- apr_table_setn(r->notes, "session-domain", ou->mess.Domain);
- if (domain)
- *domain = ou->mess.Domain;
+ if (ou->mess.Domain[0] != '\0') {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
+ "proxy: Found domain %s for %s",
ou->mess.Domain, *route);
+ if (domain)
+ *domain = ou->mess.Domain;
+ } else {
+ if (domain)
+ *domain = NULL;
+ }
}
/* We have a route in path or in cookie
* Find the worker that has this route defined.
@@ -1649,7 +1653,7 @@
"proxy: CLUSTER: (%s). Unlock failed for
pre_request",
(*balancer)->name);
}
- return HTTP_SERVICE_UNAVAILABLE;
+ return HTTP_SERVICE_UNAVAILABLE;
} else {
/* We try to to failover using another node in the domain */
failoverdomain = 1;
Show replies by date