Author: rjung Date: Tue Jan 1 15:36:32 2008 New Revision: 607947 URL: http://svn.apache.org/viewvc?rev=607947&view=rev Log: Move initialization of service members with defaults from web server specific code to our generic jk_init_ws_service() function.
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/native/iis/jk_isapi_plugin.c tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.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=607947&r1=607946&r2=607947&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 Tue Jan 1 15:36:32 2008 @@ -610,7 +610,6 @@ int size; request_rec *r = private_data->r; char *ssl_temp = NULL; - s->route = NULL; /* Used for sticky session routing */ /* Copy in function pointers (which are really methods) */ s->start_response = ws_start_response; @@ -622,9 +621,6 @@ s->vhost_to_text = ws_vhost_to_text; s->vhost_to_uw_map = ws_vhost_to_uw_map; - /* Clear RECO status */ - s->reco_status = RECO_NONE; - s->auth_type = NULL_FOR_EMPTY(r->connection->ap_auth_type); s->remote_user = NULL_FOR_EMPTY(r->connection->user); @@ -641,17 +637,11 @@ if (conf->options & JK_OPT_FLUSHPACKETS) s->flush_packets = 1; - else - s->flush_packets = 0; if (conf->options & JK_OPT_FLUSHEADER) s->flush_header = 1; - else - s->flush_header = 0; if (conf->options & JK_OPT_DISABLEREUSE) s->disable_reuse = 1; - else - s->disable_reuse = 0; /* get server name */ /* s->server_name = (char *)(r->hostname ? r->hostname : r->server->server_hostname); */ @@ -718,13 +708,6 @@ return JK_FALSE; } - s->is_ssl = JK_FALSE; - s->ssl_cert = NULL; - s->ssl_cert_len = 0; - s->ssl_cipher = NULL; /* required by Servlet 2.3 Api, allready in original ajp13 */ - s->ssl_session = NULL; - s->ssl_key_size = -1; /* required by Servlet 2.3 Api, added in jtc */ - if (conf->ssl_enable || conf->envvars) { ap_add_common_vars(r); @@ -817,9 +800,6 @@ } } - s->headers_names = NULL; - s->headers_values = NULL; - s->num_headers = 0; if (r->headers_in && ap_table_elts(r->headers_in)) { int need_content_length_header = (!s->is_chunked && s->content_length == 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=607947&r1=607946&r2=607947&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 Tue Jan 1 15:36:32 2008 @@ -625,7 +625,6 @@ char *ssl_temp = NULL; int size; - s->route = NULL; /* Used for sticky session routing */ /* Copy in function pointers (which are really methods) */ s->start_response = ws_start_response; @@ -637,9 +636,6 @@ s->vhost_to_text = ws_vhost_to_text; s->vhost_to_uw_map = ws_vhost_to_uw_map; - /* Clear RECO status */ - s->reco_status = RECO_NONE; - s->auth_type = NULL_FOR_EMPTY(r->ap_auth_type); s->remote_user = NULL_FOR_EMPTY(r->user); @@ -654,17 +650,11 @@ s->remote_addr = NULL_FOR_EMPTY(r->connection->remote_ip); if (conf->options & JK_OPT_FLUSHPACKETS) s->flush_packets = 1; - else - s->flush_packets = 0; if (conf->options & JK_OPT_FLUSHEADER) s->flush_header = 1; - else - s->flush_header = 0; if (conf->options & JK_OPT_DISABLEREUSE) s->disable_reuse = 1; - else - s->disable_reuse = 0; /* get server name */ s->server_name = (char *)ap_get_server_name(r); @@ -740,14 +730,6 @@ return JK_FALSE; } - s->is_ssl = JK_FALSE; - s->ssl_cert = NULL; - s->ssl_cert_len = 0; - s->ssl_cipher = NULL; /* required by Servlet 2.3 Api, - allready in original ajp13 */ - s->ssl_session = NULL; - s->ssl_key_size = -1; /* required by Servlet 2.3 Api, added in jtc */ - if (conf->ssl_enable || conf->envvars) { ap_add_common_vars(r); @@ -840,9 +822,6 @@ } } - s->headers_names = NULL; - s->headers_values = NULL; - s->num_headers = 0; if (r->headers_in && apr_table_elts(r->headers_in)) { int need_content_length_header = (!s->is_chunked && s->content_length == Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=607947&r1=607946&r2=607947&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Tue Jan 1 15:36:32 2008 @@ -1968,22 +1968,10 @@ DWORD huge_buf_sz; - s->route = NULL; - s->start_response = start_response; s->read = read; s->write = write; - /* Yes we do want to reuse AJP connections */ - s->disable_reuse = JK_FALSE; - - s->flush = NULL; - s->flush_packets = JK_FALSE; - s->flush_header = JK_FALSE; - - /* Clear RECO status */ - s->reco_status = RECO_NONE; - if (!(huge_buf = jk_pool_alloc(&private_data->p, MAX_PACKET_SIZE))) { return JK_FALSE; @@ -2015,15 +2003,6 @@ s->method = private_data->lpEcb->lpszMethod; s->content_length = (jk_uint64_t)private_data->lpEcb->cbTotalBytes; - s->ssl_cert = NULL; - s->ssl_cert_len = 0; - s->ssl_cipher = NULL; - s->ssl_session = NULL; - s->ssl_key_size = -1; - - s->headers_names = NULL; - s->headers_values = NULL; - s->num_headers = 0; s->uw_map = uw_map; /* * Add SSL IIS environment @@ -2060,6 +2039,8 @@ num_of_vars++; } } + /* XXX: To make the isapi plugin more consistent with the other web servers */ + /* we should also set s->ssl_cipher, s->ssl_session, and s->ssl_key_size. */ if (num_of_vars) { unsigned int j; Modified: tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c?rev=607947&r1=607946&r2=607947&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c (original) +++ tomcat/connectors/trunk/jk/native/netscape/jk_nsapi_plugin.c Tue Jan 1 15:36:32 2008 @@ -416,22 +416,13 @@ int size; int rc; - s->route = NULL; s->start_response = start_response; s->read = ws_read; s->write = ws_write; - s->flush = NULL; - s->flush_packets = JK_FALSE; - s->flush_header = JK_FALSE; - s->disable_reuse = JK_FALSE; - - /* Clear RECO status */ - s->reco_status = RECO_NONE; s->auth_type = pblock_findval("auth-type", private_data->rq->vars); s->remote_user = pblock_findval("auth-user", private_data->rq->vars); - s->content_length = 0; tmp = NULL; rc = request_header("content-length", &tmp, private_data->sn, private_data->rq); @@ -467,10 +458,6 @@ s->server_port = server_portnum; s->server_software = system_version(); - - s->headers_names = NULL; - s->headers_values = NULL; - s->num_headers = 0; s->uw_map = uw_map; #ifdef NETWARE @@ -484,7 +471,6 @@ #endif s->is_ssl = security_active; - s->ssl_key_size = -1; /* required by Servlet 2.3 Api, added in jtc */ if (s->is_ssl) { char *ssl_cert = pblock_findval("auth-cert", private_data->rq->vars); if (ssl_cert != NULL) { @@ -498,12 +484,7 @@ } s->ssl_cipher = pblock_findval("cipher", private_data->sn->client); s->ssl_session = pblock_findval("ssl-id", private_data->sn->client); - } - else { - s->ssl_cert = NULL; - s->ssl_cert_len = 0; - s->ssl_cipher = NULL; - s->ssl_session = NULL; + /* XXX: We need to investigate how to set s->ssl_key_size */ } rc = setup_http_headers(private_data, s); Modified: tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml?rev=607947&r1=607946&r2=607947&view=diff ============================================================================== --- tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml (original) +++ tomcat/connectors/trunk/jk/xdocs/miscellaneous/changelog.xml Tue Jan 1 15:36:32 2008 @@ -44,6 +44,10 @@ <subsection name="Native"> <changelog> <update> + Move initialization of service members with defaults from web server + specific code to our generic jk_init_ws_service() function. (rjung) + </update> + <update> Common: Add missing prepost cping/cpong directly after connect in case prepost cping is used, but no connect cping. (rjung) </update> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]