dispatchUser() should use a 302 http status code
authorsbassett <sbassett@wikimedia.org>
Tue, 27 Aug 2019 20:55:39 +0000 (15:55 -0500)
committerReedy <reedy@wikimedia.org>
Tue, 10 Sep 2019 18:13:25 +0000 (18:13 +0000)
dispatchUser() in SpecialRedirect.php should use a 302 http
status code instead of a 301 to avoid certain caching issues.

Bug: T231386
Change-Id: Idb0cb21cc81d73bb9f77fc211af9cfd8b4f71e7d

includes/specials/SpecialRedirect.php

index 50867dd..82d8b73 100644 (file)
@@ -90,7 +90,9 @@ class SpecialRedirect extends FormSpecialPage {
                }
                $userpage = Title::makeTitle( NS_USER, $username );
 
                }
                $userpage = Title::makeTitle( NS_USER, $username );
 
-               return Status::newGood( $userpage->getFullURL( '', false, PROTO_CURRENT ) );
+               return Status::newGood( [
+                       $userpage->getFullURL( '', false, PROTO_CURRENT ), 302
+               ] );
        }
 
        /**
        }
 
        /**