From: Brian Pane Date: Mon, 29 Apr 2002 07:45:43 +0000 (+0000) Subject: Short-circuit out of mod_userdir's translation handler faster on X-Git-Tag: 2.0.36~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da008d47244403fc91f33ce6aed3e2c3ce437aee;p=apache Short-circuit out of mod_userdir's translation handler faster on non "/~*" requests git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94855 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/mod_userdir.c b/modules/mappers/mod_userdir.c index d8b36fdfb0..0b035894a1 100644 --- a/modules/mappers/mod_userdir.c +++ b/modules/mappers/mod_userdir.c @@ -221,11 +221,10 @@ static const command_rec userdir_cmds[] = { 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 @@ static int translate_userdir(request_rec *r) * 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; }