You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jl...@locus.apache.org on 2000/03/29 21:30:28 UTC

cvs commit: jakarta-tomcat/src/native/iis_netscape jk_ajp12_worker.c

jluc        00/03/29 11:30:27

  Modified:    src/share/org/apache/tomcat/service/connector
                        Ajp12ConnectionHandler.java
               src/native/apache/jserv jserv_ajpv12.c
               src/native/iis_netscape jk_ajp12_worker.c
  Log:
  use the latest ajpv12 from JServ1.1 final.
  NB: This implies to modify, recompile the connectors to run properly.
  +
  adds ajpv12 dynamic environment variables sending. These variables are simply ignored in Tomcat.
  Just here for future mod_jserv compatibility.
  (useful to add SSL vars by example)
  Jean-Luc Rochat
  
  Revision  Changes    Path
  1.19      +32 -7     jakarta-tomcat/src/share/org/apache/tomcat/service/connector/Ajp12ConnectionHandler.java
  
  Index: Ajp12ConnectionHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/service/connector/Ajp12ConnectionHandler.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Ajp12ConnectionHandler.java	2000/03/24 03:29:38	1.18
  +++ Ajp12ConnectionHandler.java	2000/03/29 19:30:22	1.19
  @@ -198,7 +198,9 @@
   	String dummy,token1,token2;
   	int marker;
   	int signal;
  +//      Hashtable env_vars=new Hashtable();
   
  +
   	try {
   	    boolean more=true;
               while (more) {
  @@ -292,18 +294,41 @@
   		    if( doLog ) log("AJP: Server jvmRoute=" + jvmRoute);
   		    
   		    
  -		    /**
  -		     * The two following lines are commented out because we don't
  -		     * want to depend on unreleased versions of the jserv module.
  -		     *                                            - costin
  -		     */
  -		    //		dummy = ajpin.readString("");                     //SSL_CLIENT_DN
  -		    //		dummy = ajpin.readString("");                     //SSL_CLIENT_IDN
  +                    /**
  +                     * The two following lines are commented out because we don't
  +                     * want to depend on unreleased versions of the jserv module.
  +                     *                                            - costin
  +                     * The two following lines are uncommented because JServ 1.1 final
  +                     * is far behind.
  +                     * NB: you need a recent mod_jserv to use the latest protocol version.
  +                     * Theses env vars are simply ignored. (just here for compatibility)
  +                     *                                            - jluc
  +                     */
  +                     dummy = ajpin.readString(""); 
  +                     dummy = ajpin.readString("");
   		    // XXX all dummy fields will be used after core is changed to make use
   		    // of them!
   		    
   		    break;
   		    
  +                    
  +                    /**
  +                     * Marker = 5 will be used by mod_jserv to send environment vars
  +                     * as key+value (dynamically configurable).
  +                     * can be considered as "reserved", and safely ignored by other connectors.
  +                     * env_vars is (above in this  code) commented out for performance issues.
  +                     * so theses env vars are simply ignored. (just here for compatibility)
  +                     * but it is where mod_jserv would place SSL_* env vars (by exemple)
  +                     * See the new parameter for mod_jserv (version > 1.1):
  +                     * ApJServEnvVar localname remotename
  +                     *                                            - jluc
  +                     */
  +                case 5: // Environment vars
  +                    token1 = ajpin.readString(null);
  +                    token2 = ajpin.readString("");
  +//                  env_vars.put(token1, token2);
  +                    break;
  +      
   		case 3: // Header
   		    token1 = ajpin.readString(null);
   		    token2 = ajpin.readString("");
  
  
  
  1.5       +2 -3      jakarta-tomcat/src/native/apache/jserv/jserv_ajpv12.c
  
  Index: jserv_ajpv12.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/native/apache/jserv/jserv_ajpv12.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jserv_ajpv12.c	2000/02/03 23:05:26	1.4
  +++ jserv_ajpv12.c	2000/03/29 19:30:24	1.5
  @@ -57,7 +57,7 @@
    * Description: ajpv1.2 protocol, used to call local or remote jserv hosts   *
    * Author:      Pierpaolo Fumagalli <ia...@iname.com>                       *
    * Author:      Michal Mosiewicz <mi...@interdata.pl>                         *
  - * Version:     $Revision: 1.4 $                                            *
  + * Version:     $Revision: 1.5 $                                            *
    *****************************************************************************/
   #include "jserv.h"
   
  @@ -541,10 +541,9 @@
       /* Send routing info var & SSL CLIENT Certificates DNs */
       if (r->subprocess_env) {
           ajpv12_sendstring( buffsocket, ap_table_get(r->subprocess_env, "JSERV_ROUTE"));
  -	/* XXX commented out for tomcat release - need to be in sync with current JServ 
  +	/* XXX uncommented out for tomcat 3.1 release - in sync with current JServ */
           ajpv12_sendstring( buffsocket, ap_table_get(r->subprocess_env, "SSL_CLIENT_DN"));
           ajpv12_sendstring( buffsocket, ap_table_get(r->subprocess_env, "SSL_CLIENT_IDN"));
  -        */
       }
       else {
           ajpv12_sendstring( buffsocket, "");
  
  
  
  1.4       +4 -2      jakarta-tomcat/src/native/iis_netscape/jk_ajp12_worker.c
  
  Index: jk_ajp12_worker.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/native/iis_netscape/jk_ajp12_worker.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jk_ajp12_worker.c	2000/02/28 11:52:44	1.3
  +++ jk_ajp12_worker.c	2000/03/29 19:30:26	1.4
  @@ -57,7 +57,7 @@
    * Description: ajpv1.2 worker, used to call local or remote jserv hosts   *
    * Author:      Gal Shachor <sh...@il.ibm.com>                           *
    * Based on:    jserv_ajpv12.c from Jserv                                  *
  - * Version:     $Revision: 1.3 $                                               *
  + * Version:     $Revision: 1.4 $                                               *
    ***************************************************************************/
   
   #include "jk_ajp12_worker.h"
  @@ -383,7 +383,9 @@
              ajpv12_sendstring(p, s->protocol)    &&
              ajpv12_sendstring(p, 0)              && /* SERVER_SIGNATURE */ 
              ajpv12_sendstring(p, s->server_software) &&
  -           ajpv12_sendstring(p, s->jvm_route)); /* JSERV_ROUTE" */
  +           ajpv12_sendstring(p, s->jvm_route)   && /* JSERV_ROUTE */
  +           ajpv12_sendstring(p, "")             && /* JSERV ajpv12 compatibility */
  +           ajpv12_sendstring(p, ""));              /* JSERV ajpv12 compatibility */
   
       if(!ret) {
           jk_log(l, JK_LOG_ERROR, "In ajpv12_handle_request, failed to send the ajp12 start sequence\n");