Make WordPress Core

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 @helen
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.

#3 @johnbillion
12 years ago

  • Component General → Query
  • Keywords 2nd-opinion added
  • Version trunk

#4 @rachelbaker
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

Note: See TracTickets for help on using tickets.