Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MODCLUSTER-733 #168

Merged
merged 2 commits into from Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 1 addition & 29 deletions native/balancers/mod_lbmethod_cluster.c
Expand Up @@ -91,35 +91,7 @@ static proxy_worker *internal_find_best_byrequests(request_rec *r, const proxy_b
}
}
}
if (mycandidate) {
#if MODULE_MAGIC_NUMBER_MAJOR == 20120211 && MODULE_MAGIC_NUMBER_MINOR >= 124
if (proxy_run_check_trans(r, mycandidate->s->name_ex) != OK) {
#else
if (proxy_run_check_trans(r, mycandidate->s->name) != OK) {
#endif
char *ptr = balancer->workers->elts;
int sizew = balancer->workers->elt_size;
for (i = 0; i < balancer->workers->nelts; i++, ptr = ptr + sizew) {
proxy_worker **run = (proxy_worker **)ptr;
proxy_worker *httpworker = *run;
if (!strcmp(httpworker->s->hostname, mycandidate->s->hostname)) {
/* They don't the shared memory another test is needed... */
if (!memcmp(httpworker->s->scheme, "http", 4) && httpworker->s->port == mycandidate->s->port &&
!strcmp(httpworker->s->route, mycandidate->s->route)) {
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
#if MODULE_MAGIC_NUMBER_MAJOR == 20120211 && MODULE_MAGIC_NUMBER_MINOR >= 124
"proxy: byrequests balancer Using %s instead %s", httpworker->s->name_ex,
mycandidate->s->name_ex);
#else
"proxy: byrequests balancer Using %s instead %s", httpworker->s->name,
mycandidate->s->name);
#endif
return httpworker;
}
}
}
}
}

return mycandidate;
}

Expand Down
8 changes: 4 additions & 4 deletions native/mod_manager/mod_manager.c
Expand Up @@ -3742,12 +3742,12 @@ static const char *cmd_manager_enable_ws_tunnel(cmd_parms *cmd, void *dummy)
if (err != NULL) {
return err;
}
if (ap_find_linked_module("mod_proxy_wstunnel.c") != NULL) {
if (ap_find_linked_module("mod_proxy_http.c") != NULL) {
mconf->enable_ws_tunnel = 1;
return NULL;
}

return "EnableWsTunnel requires mod_proxy_wstunnel.c";
return "EnableWsTunnel requires mod_proxy_http.c";
}

static const char *cmd_manager_ws_upgrade_header(cmd_parms *cmd, void *mconfig, const char *word)
Expand All @@ -3763,13 +3763,13 @@ static const char *cmd_manager_ws_upgrade_header(cmd_parms *cmd, void *mconfig,
return apr_psprintf(cmd->temp_pool, "upgrade protocol length must be < %d characters",
PROXY_WORKER_MAX_SCHEME_SIZE);
}
if (ap_find_linked_module("mod_proxy_wstunnel.c") != NULL) {
if (ap_find_linked_module("mod_proxy_http.c") != NULL) {
mconf->enable_ws_tunnel = 1;
mconf->ws_upgrade_header = apr_pstrdup(cmd->pool, word);
return NULL;
}

return "WSUpgradeHeader requires mod_proxy_wstunnel.c";
return "WSUpgradeHeader requires mod_proxy_http.c";
}

static const char *cmd_manager_ajp_secret(cmd_parms *cmd, void *mconfig, const char *word)
Expand Down
1 change: 0 additions & 1 deletion test/httpd/mod_lbmethod_cluster.conf
@@ -1,6 +1,5 @@
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so

Expand Down
1 change: 0 additions & 1 deletion test/httpd/mod_proxy_cluster.conf
Expand Up @@ -2,7 +2,6 @@ LoadModule watchdog_module modules/mod_watchdog.so

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
Expand Down