Author: rjung Date: Thu Mar 5 01:29:00 2009 New Revision: 750274 URL: http://svn.apache.org/viewvc?rev=750274&view=rev Log: Rename two of the new environment variables, after checking what they really do. local name and port are set from those AJP attributes, server name and port are parsed from the host header.
Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c tomcat/connectors/trunk/jk/xdocs/reference/apache.xml Modified: tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c?rev=750274&r1=750273&r2=750274&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-1.3/mod_jk.c Thu Mar 5 01:29:00 2009 @@ -68,8 +68,8 @@ #define JK_ENV_REMOTE_HOST ("JK_REMOTE_HOST") #define JK_ENV_REMOTE_USER ("JK_REMOTE_USER") #define JK_ENV_AUTH_TYPE ("JK_AUTH_TYPE") -#define JK_ENV_SERVER_NAME ("JK_SERVER_NAME") -#define JK_ENV_SERVER_PORT ("JK_SERVER_PORT") +#define JK_ENV_LOCAL_NAME ("JK_LOCAL_NAME") +#define JK_ENV_LOCAL_PORT ("JK_LOCAL_PORT") #define JK_ENV_HTTPS ("HTTPS") #define JK_ENV_CERTS ("SSL_CLIENT_CERT") #define JK_ENV_CIPHER ("SSL_CIPHER") @@ -174,8 +174,8 @@ char *remote_host_indicator; char *remote_user_indicator; char *auth_type_indicator; - char *server_name_indicator; - char *server_port_indicator; + char *local_name_indicator; + char *local_port_indicator; /* * SSL Support @@ -713,13 +713,13 @@ /* s->server_name = (char *)(r->hostname ? r->hostname : r->server->server_hostname); */ /* XXX : a la jk2 */ s->server_name = get_env_string(r, (char *)ap_get_server_name(r), - conf->server_name_indicator, 0); + conf->local_name_indicator, 0); /* get the real port (otherwise redirect failed) */ /* s->server_port = htons( r->connection->local_addr.sin_port ); */ /* XXX : a la jk2 */ s->server_port = get_env_int(r, ap_get_server_port(r), - conf->server_port_indicator); + conf->local_port_indicator); s->server_software = (char *)ap_get_server_version(); @@ -1747,23 +1747,23 @@ return NULL; } -static const char *jk_set_server_name_indicator(cmd_parms * cmd, - void *dummy, char *indicator) +static const char *jk_set_local_name_indicator(cmd_parms * cmd, + void *dummy, char *indicator) { server_rec *s = cmd->server; jk_server_conf_t *conf = (jk_server_conf_t *) ap_get_module_config(s->module_config, &jk_module); - conf->server_name_indicator = ap_pstrdup(cmd->pool, indicator); + conf->local_name_indicator = ap_pstrdup(cmd->pool, indicator); return NULL; } -static const char *jk_set_server_port_indicator(cmd_parms * cmd, - void *dummy, char *indicator) +static const char *jk_set_local_port_indicator(cmd_parms * cmd, + void *dummy, char *indicator) { server_rec *s = cmd->server; jk_server_conf_t *conf = (jk_server_conf_t *) ap_get_module_config(s->module_config, &jk_module); - conf->server_port_indicator = ap_pstrdup(cmd->pool, indicator); + conf->local_port_indicator = ap_pstrdup(cmd->pool, indicator); return NULL; } @@ -2161,10 +2161,10 @@ "Name of the Apache environment that contains the remote user name"}, {"JkAuthTypeIndicator", jk_set_auth_type_indicator, NULL, RSRC_CONF, TAKE1, "Name of the Apache environment that contains the type of authentication"}, - {"JkServerNameIndicator", jk_set_server_name_indicator, NULL, RSRC_CONF, TAKE1, - "Name of the Apache environment that contains the server name"}, - {"JkServerPortIndicator", jk_set_server_port_indicator, NULL, RSRC_CONF, TAKE1, - "Name of the Apache environment that contains the server port"}, + {"JkLocalNameIndicator", jk_set_local_name_indicator, NULL, RSRC_CONF, TAKE1, + "Name of the Apache environment that contains the local name"}, + {"JkLocalPortIndicator", jk_set_local_port_indicator, NULL, RSRC_CONF, TAKE1, + "Name of the Apache environment that contains the local port"}, /* * Apache has multiple SSL modules (for example apache_ssl, stronghold @@ -2480,8 +2480,8 @@ c->remote_host_indicator = JK_ENV_REMOTE_HOST; c->remote_user_indicator = JK_ENV_REMOTE_USER; c->auth_type_indicator = JK_ENV_AUTH_TYPE; - c->server_name_indicator = JK_ENV_SERVER_NAME; - c->server_port_indicator = JK_ENV_SERVER_PORT; + c->local_name_indicator = JK_ENV_LOCAL_NAME; + c->local_port_indicator = JK_ENV_LOCAL_PORT; /* * By default we will try to gather SSL info. @@ -2554,10 +2554,10 @@ overrides->remote_user_indicator = base->remote_user_indicator; if (!overrides->auth_type_indicator) overrides->auth_type_indicator = base->auth_type_indicator; - if (!overrides->server_name_indicator) - overrides->server_name_indicator = base->server_name_indicator; - if (!overrides->server_port_indicator) - overrides->server_port_indicator = base->server_port_indicator; + if (!overrides->local_name_indicator) + overrides->local_name_indicator = base->local_name_indicator; + if (!overrides->local_port_indicator) + overrides->local_port_indicator = base->local_port_indicator; if (overrides->ssl_enable == JK_UNSET) overrides->ssl_enable = base->ssl_enable; Modified: tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c?rev=750274&r1=750273&r2=750274&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c (original) +++ tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c Thu Mar 5 01:29:00 2009 @@ -110,8 +110,8 @@ #define JK_ENV_REMOTE_HOST ("JK_REMOTE_HOST") #define JK_ENV_REMOTE_USER ("JK_REMOTE_USER") #define JK_ENV_AUTH_TYPE ("JK_AUTH_TYPE") -#define JK_ENV_SERVER_NAME ("JK_SERVER_NAME") -#define JK_ENV_SERVER_PORT ("JK_SERVER_PORT") +#define JK_ENV_LOCAL_NAME ("JK_LOCAL_NAME") +#define JK_ENV_LOCAL_PORT ("JK_LOCAL_PORT") #define JK_ENV_HTTPS ("HTTPS") #define JK_ENV_CERTS ("SSL_CLIENT_CERT") #define JK_ENV_CIPHER ("SSL_CIPHER") @@ -204,8 +204,8 @@ char *remote_host_indicator; char *remote_user_indicator; char *auth_type_indicator; - char *server_name_indicator; - char *server_port_indicator; + char *local_name_indicator; + char *local_port_indicator; /* * SSL Support @@ -756,7 +756,7 @@ /* get server name */ s->server_name = get_env_string(r, (char *)ap_get_server_name(r), - conf->server_name_indicator, 0); + conf->local_name_indicator, 0); /* get the real port (otherwise redirect failed) */ /* XXX: use apache API for getting server port @@ -765,7 +765,7 @@ * s->server_port = r->connection->local_addr->port; */ s->server_port = get_env_int(r, ap_get_server_port(r), - conf->server_port_indicator); + conf->local_port_indicator); #if (AP_MODULE_MAGIC_AT_LEAST(20051115,4)) && !defined(API_COMPATIBILITY) s->server_software = (char *)ap_get_server_description(); @@ -1833,23 +1833,23 @@ return NULL; } -static const char *jk_set_server_name_indicator(cmd_parms * cmd, - void *dummy, const char *indicator) +static const char *jk_set_local_name_indicator(cmd_parms * cmd, + void *dummy, const char *indicator) { server_rec *s = cmd->server; jk_server_conf_t *conf = (jk_server_conf_t *) ap_get_module_config(s->module_config, &jk_module); - conf->server_name_indicator = apr_pstrdup(cmd->pool, indicator); + conf->local_name_indicator = apr_pstrdup(cmd->pool, indicator); return NULL; } -static const char *jk_set_server_port_indicator(cmd_parms * cmd, - void *dummy, const char *indicator) +static const char *jk_set_local_port_indicator(cmd_parms * cmd, + void *dummy, const char *indicator) { server_rec *s = cmd->server; jk_server_conf_t *conf = (jk_server_conf_t *) ap_get_module_config(s->module_config, &jk_module); - conf->server_port_indicator = apr_pstrdup(cmd->pool, indicator); + conf->local_port_indicator = apr_pstrdup(cmd->pool, indicator); return NULL; } @@ -2276,10 +2276,10 @@ "Name of the Apache environment that contains the remote user name"), AP_INIT_TAKE1("JkAuthTypeIndicator", jk_set_auth_type_indicator, NULL, RSRC_CONF, "Name of the Apache environment that contains the type of authentication"), - AP_INIT_TAKE1("JkServerNameIndicator", jk_set_server_name_indicator, NULL, RSRC_CONF, - "Name of the Apache environment that contains the server name"), - AP_INIT_TAKE1("JkServerPortIndicator", jk_set_server_port_indicator, NULL, RSRC_CONF, - "Name of the Apache environment that contains the server port"), + AP_INIT_TAKE1("JkLocalNameIndicator", jk_set_local_name_indicator, NULL, RSRC_CONF, + "Name of the Apache environment that contains the local name"), + AP_INIT_TAKE1("JkLocalPortIndicator", jk_set_local_port_indicator, NULL, RSRC_CONF, + "Name of the Apache environment that contains the local port"), /* * Apache has multiple SSL modules (for example apache_ssl, stronghold @@ -2706,8 +2706,8 @@ c->remote_host_indicator = JK_ENV_REMOTE_HOST; c->remote_user_indicator = JK_ENV_REMOTE_USER; c->auth_type_indicator = JK_ENV_AUTH_TYPE; - c->server_name_indicator = JK_ENV_SERVER_NAME; - c->server_port_indicator = JK_ENV_SERVER_PORT; + c->local_name_indicator = JK_ENV_LOCAL_NAME; + c->local_port_indicator = JK_ENV_LOCAL_PORT; /* * By default we will try to gather SSL info. @@ -2783,10 +2783,10 @@ overrides->remote_user_indicator = base->remote_user_indicator; if (!overrides->auth_type_indicator) overrides->auth_type_indicator = base->auth_type_indicator; - if (!overrides->server_name_indicator) - overrides->server_name_indicator = base->server_name_indicator; - if (!overrides->server_port_indicator) - overrides->server_port_indicator = base->server_port_indicator; + if (!overrides->local_name_indicator) + overrides->local_name_indicator = base->local_name_indicator; + if (!overrides->local_port_indicator) + overrides->local_port_indicator = base->local_port_indicator; if (overrides->ssl_enable == JK_UNSET) overrides->ssl_enable = base->ssl_enable; Modified: tomcat/connectors/trunk/jk/xdocs/reference/apache.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/reference/apache.xml?rev=750274&r1=750273&r2=750274&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/xdocs/reference/apache.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/reference/apache.xml Thu Mar 5 01:29:00 2009 @@ -298,23 +298,23 @@ <br/> The default value is "SSL_CIPHER_USEKEYSIZE". </p></attribute> -<attribute name="JkServerNameIndicator" required="false"><p> +<attribute name="JkLocalNameIndicator" required="false"><p> Name of the Apache environment variable which can be used to overwrite -the forwarded server name. +the forwarded local name. Use this only if you need to adjust the data (see the <a href="../generic_howto/proxy.html">proxy</a> documentation). <br/> -The default value is "JK_SERVER_NAME". +The default value is "JK_LOCAL_NAME". <br/> This directive has been added in version 1.2.28 of mod_jk. </p></attribute> -<attribute name="JkServerPortIndicator" required="false"><p> +<attribute name="JkLocalPortIndicator" required="false"><p> Name of the Apache environment variable which can be used to overwrite -the forwarded server port. +the forwarded local port. Use this only if you need to adjust the data (see the <a href="../generic_howto/proxy.html">proxy</a> documentation). <br/> -The default value is "JK_SERVER_PORT". +The default value is "JK_LOCAL_PORT". <br/> This directive has been added in version 1.2.28 of mod_jk. </p></attribute> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org