Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make sure the httpd version is good for us.

  • Loading branch information...
commit 5a288d6a9fc365506665befd814e51fd7a41ee26 1 parent 898223b
@jfclere jfclere authored
Showing with 23 additions and 0 deletions.
  1. +23 −0 native/mod_proxy_cluster/mod_proxy_cluster.c
View
23 native/mod_proxy_cluster/mod_proxy_cluster.c
@@ -2348,6 +2348,29 @@ static int proxy_cluster_post_config(apr_pool_t *p, apr_pool_t *plog,
{
const char *userdata_key = "mod_cluster_init";
void *data;
+ void *sconf = s->module_config;
+ proxy_server_conf *conf = (proxy_server_conf *)ap_get_module_config(sconf, &proxy_module);
+ int sizew = conf->workers->elt_size;
+ int sizeb = conf->balancers->elt_size;
+#if AP_MODULE_MAGIC_AT_LEAST(20101223,1)
+ if (sizew != sizeof(proxy_worker *) || sizeb != sizeof(proxy_balancer)) {
+#else
+ if (sizew != sizeof(proxy_worker) || sizeb != sizeof(proxy_balancer)) {
+#endif
+ ap_version_t version;
+ ap_get_server_revision(&version);
+
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
+ "httpd version %d.%d.%d mismatch detected", version.major, version.minor, version.patch);
+#if AP_MODULE_MAGIC_AT_LEAST(20101223,1)
+#else
+ if (version.patch < 8) {
+ ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
+ "httpd version %d.%d.%d too old", version.major, version.minor, version.patch);
+ return HTTP_INTERNAL_SERVER_ERROR;
+ }
+#endif
+ }
apr_pool_userdata_get(&data, userdata_key, s->process->pool);
if (data && sessionid_storage) {
Please sign in to comment.
Something went wrong with that request. Please try again.