Opened 12 years ago
Closed 11 years ago
#29829 closed feature request (duplicate)
Handling other HTTP header returns, rather than solely 404.
| Reported by: | rhyswynne | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Query | Version: | |
| Severity: | normal | Keywords: | 2nd-opinion |
| Cc: | Focuses: |
Description
It would be nice to return more HTTP Status codes rather than just 404.
For example, Privately Published posts should probably return a 403 Code - http://en.wikipedia.org/wiki/HTTP_403, rather than a 404.
Would be nice to have a set_header('code') & is_header('code'), so we could have more control for what pages can show up if need be.
Change History (4)
#2
in reply to: ↑ description
@
12 years ago
Replying to rhyswynne:
For example, Privately Published posts should probably return a 403 Code - http://en.wikipedia.org/wiki/HTTP_403, rather than a 404.
I disagree with this specifically - privately published posts should not be "known" to anybody who shouldn't have access. Returning a 403 instead of 404 would make it known.
#4
@
11 years ago
- Milestone Awaiting Review
- Resolution → duplicate
- Status new → closed
After #10551 wp_die() does support a parameter for the HTTP response code (r30355) and returns 403 for permission check failures (r30356). Closing this ticket as a duplicate, since the feedback above goes against the "nice to have" scope addition of:
Privately Published posts should probably return a 403 Code
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Related: #10551, #11286, #17010, #17159, #18030, #25446.