Author: gutza
Description:
Patch for includes/OutputPage.php
When a user requests a random page, the MediaWiki software responds with a HTTP 302 "Found" status code. According to RFC 2616, HTTP status code 302 is meant to be used when a resource has been temporarily moved. As such, "Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests." Of course, this is not appropriate for random pages -- and the result of this implementation is that spiders improperly index random pages.
I have changed the code as to provide the proper response, i.e. HTTP status code 303 "See other", which seems a lot more appropriate: "This method exists primarily to allow the output of a POST-activated script to redirect the user agent to a selected resource. The new URI is not a substitute reference for the originally requested resource. The 303 response MUST NOT be cached, but the response to the second (redirected) request might be cacheable."
I'm attaching patches to this bug. The diffs are made against the latest versions of the files in the SVN repository (OutputPage.php Revision 57608, SpecialRandomPage.php Revision 55188).
Version: unspecified
Severity: minor
attachment op[1].diff ignored as obsolete