[wp-trac] [WordPress Trac] #10930: Wordpress incorrectly returns a 200 on a 404
WordPress Trac
wp-trac at lists.automattic.com
Mon Nov 2 09:24:23 UTC 2009
#10930: Wordpress incorrectly returns a 200 on a 404
--------------------------+-------------------------------------------------
Reporter: dtsn | Owner: joostdevalk
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: Future Release
Component: General | Version: 2.9
Severity: normal | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Changes (by joostdevalk):
* keywords: => has-patch needs-testing
* owner: => joostdevalk
* version: 2.8.4 => 2.9
* status: new => accepted
Comment:
It doens't do this correctly at all, and it has nothing to do with server
settings. is_single is set to true, independent of whether there are
actually any posts there. Handle_404 in classes.php doesn't handle 404's
if permalinks are disabled or if the link that was opened isn't a
permalink.
I've got a patch, which I will attach in a second, that fixes this, the
only "issue" is that right now, if you open page_id=500 and 500 is
actually the id of an attachment, it'll redirect to the attachment. With
this patch in place, it won't do that anymore. To be honest I think that's
how it SHOULD work, but it's good to know.
Also, a preview page should throw a 404 if you're not logged in, otherwise
it would expose that there actually IS a post with that ID but it's not
published yet, this patch takes care of that as well.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10930#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list