Last modified: 2014-07-16 11:36:21 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12345 - Server should return a 410 HTTP status code for deleted pages
Server should return a 410 HTTP status code for deleted pages
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Lowest minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-18 19:31 UTC by Tristan Miller
Modified: 2014-07-16 11:36 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tristan Miller 2007-12-18 19:31:55 UTC
As per RFC 2616, MediaWiki should return a 410 HTTP status code (410 Gone) for pages which have been deleted.  This will assist search engines, link checkers, and other automated tools in removing links to wiki pages which no longer exist.  Note that MediaWiki can still display whatever web page it normally does when the user accesses a deleted page; it's just the HTTP status code which should be altered (from 200 OK to 410 Gone).

See also Bug 2585.
Comment 1 Antoine "hashar" Musso (WMF) 2007-12-20 18:35:11 UTC
410 is when you are sure the given page will no longer be served.
With lighttpd, the server does not even send the page content on a 410 error code.

Marking as wont fix :)


The patch for Article::getContent() if you ever want to try:

Index: includes/Article.php
===================================================================
--- includes/Article.php        (revision 28716)
+++ includes/Article.php        (working copy)
@@ -159,6 +159,12 @@
                        wfProfileOut( __METHOD__ );
                        $wgOut->setRobotpolicy( 'noindex,nofollow' );
 
+                       if( $this->getTitle()->isDeleted() ) {
+                               $wgOut->setStatusCode( 410 );
+                       } else {
+                               $wgOut->setStatusCode( 404 );
+                       }
+
 			if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
 				$ret = wfMsgWeirdKey ( $this->mTitle->getText() ) ;
 			} else {

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links