You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jf...@apache.org on 2001/08/03 16:42:45 UTC

cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c

jfclere     01/08/03 07:42:45

  Modified:    jk/native/apache-1.3 mod_jk.c
               jk/native/apache-2.0 mod_jk.c
  Log:
  Test the context if it does not start with '/' uri_worker_map_add makes
  strange things.
  
  Revision  Changes    Path
  1.10      +4 -2      jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c
  
  Index: mod_jk.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- mod_jk.c	2001/07/02 21:18:45	1.9
  +++ mod_jk.c	2001/08/03 14:42:45	1.10
  @@ -61,7 +61,7 @@
    * Author:      Gal Shachor <sh...@il.ibm.com>                           *
    *              Dan Milstein <da...@shore.net>                            *
    *              Henri Gomez <hg...@slib.fr>                               *
  - * Version:     $Revision: 1.9 $                                           *
  + * Version:     $Revision: 1.10 $                                           *
    ***************************************************************************/
   
   /*
  @@ -595,11 +595,13 @@
       server_rec *s = cmd->server;
       jk_server_conf_t *conf =
           (jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
  +    char *old;
  +    if (context[0]!='/')
  +        return "Context should start with /";
   
       /*
        * Add the new worker to the alias map.
        */
  -    char *old;
       map_put(conf->uri_to_context, context, worker, (void **)&old);
       return NULL;
   }
  
  
  
  1.15      +4 -2      jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c
  
  Index: mod_jk.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- mod_jk.c	2001/07/03 22:34:09	1.14
  +++ mod_jk.c	2001/08/03 14:42:45	1.15
  @@ -60,7 +60,7 @@
    * Description: Apache 2 plugin for Jakarta/Tomcat                         *
    * Author:      Gal Shachor <sh...@il.ibm.com>                           *
    * 		        Henri Gomez <hg...@slib.fr>                               *
  - * Version:     $Revision: 1.14 $                                           *
  + * Version:     $Revision: 1.15 $                                           *
    ***************************************************************************/
   
   /*
  @@ -595,11 +595,13 @@
       server_rec *s = cmd->server;
       jk_server_conf_t *conf =
           (jk_server_conf_t *)ap_get_module_config(s->module_config, &jk_module);
  +    char *old;
  +    if (context[0]!='/')
  +        return "Context should start with /";
   
       /*
        * Add the new worker to the alias map.
        */
  -    char *old;
       map_put(conf->uri_to_context, context, worker, (void **)&old);
       return NULL;
   }