tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native/apache-2.0 mod_jk.c
Date Mon, 22 Jul 2002 02:48:11 GMT
bojan       2002/07/21 19:48:11

  Modified:    jk/native/apache-2.0 mod_jk.c
  Log:
  Be a bit more specific about what is a directory.
  
  Revision  Changes    Path
  1.51      +10 -13    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.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- mod_jk.c	21 Jul 2002 22:34:25 -0000	1.50
  +++ mod_jk.c	22 Jul 2002 02:48:11 -0000	1.51
  @@ -1622,8 +1622,9 @@
           /* First find just the name of the file, no directory */
           r->filename = (char *)apr_filename_of_pathname(r->uri);
   
  -        /* Ony if valid sub-request, most likely from mod_dir */
  -        if (r->main && r->main->filename && *r->main->filename){
  +        /* Ony if sub-request for a directory, most likely from mod_dir */
  +        if (r->main && r->main->filename &&
  +            ap_is_directory(r->pool, r->main->filename)){
   	
               /* The filename from the main request will be set to what should
                * be picked up, aliases included. Tomcat will need to know about
  @@ -1631,17 +1632,13 @@
                * be fine. */
   
               /* Need absolute path to stat */
  -            if (r->main->filename[strlen(r->main->filename)-1] == '/'){
  -                if (apr_filepath_merge(&r->filename,
  -                                       r->main->filename, r->filename,
  -                                       APR_FILEPATH_SECUREROOT |
  -                                       APR_FILEPATH_TRUENAME,
  -                                       r->pool)
  -                    != APR_SUCCESS){
  -                  return DECLINED;
  -                }
  -            } else {
  -                r->filename = apr_pstrdup(r->pool, r->main->filename);
  +            if (apr_filepath_merge(&r->filename,
  +                                   r->main->filename, r->filename,
  +                                   APR_FILEPATH_SECUREROOT |
  +                                   APR_FILEPATH_TRUENAME,
  +                                   r->pool)
  +                != APR_SUCCESS){
  +              return DECLINED;
               }
   
               /* Stat the file so that mod_dir knows it's there */
  
  
  

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


Mime
View raw message