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 2005/07/04 17:55:48 UTC

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

jfclere     2005/07/04 08:55:48

  Modified:    jk/native/apache-1.3 mod_jk.c
  Log:
  Fix PR 34474. Note that if the // are in the cookie path the cookie won't
  work. (but that is the same in 2.x and when using ajp-proxy.
  
  Revision  Changes    Path
  1.86      +9 -7      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.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- mod_jk.c	18 May 2005 18:19:31 -0000	1.85
  +++ mod_jk.c	4 Jul 2005 15:55:48 -0000	1.86
  @@ -2111,7 +2111,11 @@
   
           if (conf) {
               jk_logger_t *l = conf->log ? conf->log : main_log;
  -            const char *worker = map_uri_to_worker(conf->uw_map, r->uri, l);
  +            char *clean_uri = ap_pstrdup(r->pool, r->uri);
  +            const char *worker;
  +
  +            ap_no2slash(clean_uri);
  +            worker = map_uri_to_worker(conf->uw_map, clean_uri, l);
   
               /* Don't know the worker, ForwardDirectories is set, there is a
                * previous request for which the handler is JK_HANDLER (as set by
  @@ -2119,8 +2123,8 @@
                * --> forward to Tomcat, via default worker */
               if (!worker && (conf->options & JK_OPT_FWDDIRS) &&
                   r->prev && r->prev->handler &&
  -                !strcmp(r->prev->handler, JK_HANDLER) && r->uri &&
  -                strlen(r->uri) && r->uri[strlen(r->uri) - 1] == '/') {
  +                !strcmp(r->prev->handler, JK_HANDLER) && clean_uri &&
  +                strlen(clean_uri) && clean_uri[strlen(clean_uri) - 1] == '/') {
                   
                   if (worker_env.num_of_workers) {
                       /* Nothing here to do but assign the first worker since we
  @@ -2128,7 +2132,7 @@
                       worker = worker_env.worker_list[0];
   
                       jk_log(l, JK_LOG_DEBUG, "Manual configuration for %s %s",
  -                           r->uri, worker_env.worker_list[0]);
  +                           clean_uri, worker_env.worker_list[0]);
                   }
               }
   
  @@ -2137,8 +2141,6 @@
                   ap_table_setn(r->notes, JK_WORKER_ID, worker);
               }
               else if (conf->alias_dir != NULL) {
  -                char *clean_uri = ap_pstrdup(r->pool, r->uri);
  -                ap_no2slash(clean_uri);
                   /* Automatically map uri to a context static file */
                   jk_log(l, JK_LOG_DEBUG,
                          "mod_jk::jk_translate, check alias_dir: %s",
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org