httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_userdir.c
Date Mon, 29 Apr 2002 07:45:43 GMT
brianp      02/04/29 00:45:43

  Modified:    modules/mappers mod_userdir.c
  Log:
  Short-circuit out of mod_userdir's translation handler faster on
  non "/~*" requests
  
  Revision  Changes    Path
  1.46      +10 -5     httpd-2.0/modules/mappers/mod_userdir.c
  
  Index: mod_userdir.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_userdir.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- mod_userdir.c	25 Apr 2002 07:18:39 -0000	1.45
  +++ mod_userdir.c	29 Apr 2002 07:45:43 -0000	1.46
  @@ -221,11 +221,10 @@
   
   static int translate_userdir(request_rec *r)
   {
  -    ap_conf_vector_t *server_conf = r->server->module_config;
  -    const userdir_config *s_cfg = ap_get_module_config(server_conf,
  -                                                       &userdir_module);
  +    ap_conf_vector_t *server_conf;
  +    const userdir_config *s_cfg;
       char *name = r->uri;
  -    const char *userdirs = s_cfg->userdir;
  +    const char *userdirs;
       const char *w, *dname;
       char *redirect;
       char *x = NULL;
  @@ -235,7 +234,13 @@
        * If the URI doesn't match our basic pattern, we've nothing to do with
        * it.
        */
  -    if (s_cfg->userdir == NULL || name[0] != '/' || name[1] != '~') {
  +    if (name[0] != '/' || name[1] != '~') {
  +        return DECLINED;
  +    }
  +    server_conf = r->server->module_config;
  +    s_cfg = ap_get_module_config(server_conf, &userdir_module);
  +    userdirs = s_cfg->userdir;
  +    if (userdirs == NULL) {
           return DECLINED;
       }
   
  
  
  

Mime
View raw message