You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2009/06/01 15:37:59 UTC

svn commit: r780648 - in /httpd/httpd/trunk: CHANGES modules/mappers/mod_alias.c

Author: jim
Date: Mon Jun  1 13:37:59 2009
New Revision: 780648

URL: http://svn.apache.org/viewvc?rev=780648&view=rev
Log:
Fix error with arg counting

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/mappers/mod_alias.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=780648&r1=780647&r2=780648&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Mon Jun  1 13:37:59 2009
@@ -7,7 +7,7 @@
      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>]

Modified: httpd/httpd/trunk/modules/mappers/mod_alias.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_alias.c?rev=780648&r1=780647&r2=780648&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_alias.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_alias.c Mon Jun  1 13:37:59 2009
@@ -180,10 +180,11 @@
     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;