Last modified: 2009-12-30 05:19:25 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 4880 - action=raw should return a 404 header if the requested article does not exist.
action=raw should return a 404 header if the requested article does not exist.
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
All All
: Normal minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2006-02-05 19:21 UTC by Daniel Kinzler
Modified: 2009-12-30 05:19 UTC (History)
0 users

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


Description Daniel Kinzler 2006-02-05 19:21:58 UTC
When action=raw is used to retrieve the wikitext of an article, but no such
article exists, MediaWiki should respond with HTTP error 404 "Not Found".
Currently, it simply returns an empty text. Thus, there's no way for scripts to
tell if a page does not exist, or if it is simply blank. If a HTML message
should accompany the 404 code, or again an empty page, i'm not sure. The former
is nicer if tried with a browser, the latter is better for backward
compatibility with existing scripts.

Returning 404 for non-existing pages *regardles* if action=raw is used or not
should also be considered - but I expect there meight be issues with "smart"
error pages in some "advanced" browsers.

Not returning the 404 code if a nonexisting page is requested is actually
against the HTTP spec, so I marked this as minor bug, rather than a feature
Comment 1 Brion Vibber 2006-02-05 21:54:59 UTC
Possibly dupe this to bug 2585, or else cancel 2585 in favor of a raw-specific version.
Comment 2 Platonides 2006-05-13 21:40:13 UTC
"smart" error pages in some "advanced" browsers  don't show if you provide a 404
page long enough. (or at least i have seen some 404 pages sending extra data to
bypasss it for IE). Our article-doesn't exist is long enough i think ;)

In any case, it needs browser-checking.
Comment 3 Rob Church 2006-06-24 21:20:23 UTC
According to includes/RawPage.php, a 404 header *is* generated if the page can't
be found.
Comment 4 Platonides 2006-06-24 21:51:34 UTC
It *does* return 404 on action=raw, so i mark this as fixed.
There's bug 2585 for showing non-raw 404. 
I think we had some excuse but i don't remember...

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