From: Jim Jagielski Date: Mon, 1 Jun 2009 13:37:59 +0000 (+0000) Subject: Fix error with arg counting X-Git-Tag: 2.3.3~531 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a110cfaaf985f13dfbba9ddfa268008a6af8fede;p=apache Fix error with arg counting git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@780648 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 3c38f5367c..ba34a6361c 100644 --- a/CHANGES +++ b/CHANGES @@ -7,7 +7,7 @@ Changes with Apache 2.3.3 failed to send a request body. PR 46949 [Ruediger Pluem] *) mod_alias: check sanity in Redirect arguments. - PR 44729 [Sönke Tesch ] + PR 44729 [Sönke Tesch , Jim Jagielski] *) mod_proxy_http: fix Host: header for literal IPv6 addresses. PR 47177 [Carlos Garcia Braschi ] diff --git a/modules/mappers/mod_alias.c b/modules/mappers/mod_alias.c index 79079863fe..09aa2d8ca4 100644 --- a/modules/mappers/mod_alias.c +++ b/modules/mappers/mod_alias.c @@ -180,10 +180,11 @@ static const char *add_redirect_internal(cmd_parms *cmd, const char *f = arg2; const char *url = arg3; - if (arg3 != NULL) { - if (!strcasecmp(arg1, "gone")) - status = HTTP_GONE; - else if (!strcasecmp(arg1, "permanent")) + if (!arg3 && !strcasecmp(arg1, "gone")) { + status = HTTP_GONE; + } + else if (arg3) { + if (!strcasecmp(arg1, "permanent")) status = HTTP_MOVED_PERMANENTLY; else if (!strcasecmp(arg1, "temp")) status = HTTP_MOVED_TEMPORARILY;