]> granicus.if.org Git - apache/commitdiff
Fix error with arg counting
authorJim Jagielski <jim@apache.org>
Mon, 1 Jun 2009 13:37:59 +0000 (13:37 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 1 Jun 2009 13:37:59 +0000 (13:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@780648 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/mappers/mod_alias.c

diff --git a/CHANGES b/CHANGES
index 3c38f5367c8f4e7e414b2f67ab7194f722fc2883..ba34a6361cf9b48f778e10f16336a2ac086ea8d3 100644 (file)
--- 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 <st kino-fahrplan.de>]
+     PR 44729 [Sönke Tesch <st kino-fahrplan.de>, Jim Jagielski]
 
   *) mod_proxy_http: fix Host: header for literal IPv6 addresses.
      PR 47177 [Carlos Garcia Braschi <cgbraschi gmail.com>]
index 79079863fea0fb217599af31422432ac3c5d03e1..09aa2d8ca46c6ba823c2522bd60eacb592e5d2f3 100644 (file)
@@ -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;