]> granicus.if.org Git - apache/commitdiff
* Some custom defined response codes also do not require 3 arguments (all that
authorRuediger Pluem <rpluem@apache.org>
Mon, 1 Jun 2009 14:08:19 +0000 (14:08 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 1 Jun 2009 14:08:19 +0000 (14:08 +0000)
  are not redirects).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@780655 13f79535-47bb-0310-9956-ffa450edef68

modules/mappers/mod_alias.c

index 09aa2d8ca46c6ba823c2522bd60eacb592e5d2f3..717f229e8aa1b7f942f75a6cdea094841878e41f 100644 (file)
@@ -180,9 +180,10 @@ static const char *add_redirect_internal(cmd_parms *cmd,
     const char *f = arg2;
     const char *url = arg3;
 
-    if (!arg3 && !strcasecmp(arg1, "gone")) {
+    if (!arg3 && !strcasecmp(arg1, "gone"))
         status = HTTP_GONE;
-    }
+    else if (apr_isdigit(*arg1))
+        status = atoi(arg1);
     else if (arg3) {
         if (!strcasecmp(arg1, "permanent"))
             status = HTTP_MOVED_PERMANENTLY;
@@ -190,8 +191,6 @@ static const char *add_redirect_internal(cmd_parms *cmd,
             status = HTTP_MOVED_TEMPORARILY;
         else if (!strcasecmp(arg1, "seeother"))
             status = HTTP_SEE_OTHER;
-        else if (apr_isdigit(*arg1))
-            status = atoi(arg1);
         else {
             return "Redirect: invalid first argument (of three)";
         }