Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#8226 closed defect (bug) (duplicate)

WP returns invalid status headers when PHP runs as CGI

Reported by: tenpura Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7
Component: General Keywords:
Focuses: Cc:


When PHP runs via CGI, the HTTP status header will not be correctly set.

for example,

header('HTTP/1.0 404 Not Found');

returns "404 OK". To get the expected result, the code needs to be written like

header('Status: 404 Not Found');


Detailed Information: http://drupal.org/node/175855

Attachments (2)

8226.diff (699 bytes) - added by tenpura 10 years ago.
8226.2.diff (1.0 KB) - added by ryan 10 years ago.
Unified patch plus explanatory comment

Download all attachments as: .zip

Change History (7)

10 years ago

#1 @snakefoot
10 years ago

Sending the proper header requires two lines (First gives the error code, the other gives the status-message)

header("HTTP/1.1 410 Gone");
header('status: 410 Gone');

10 years ago

Unified patch plus explanatory comment

#2 @jacobsantos
9 years ago

  • Milestone 2.7 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #7361.

#3 @tenpura
9 years ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

functions.php is not fixed yet.

See 8226.diff.

#4 @tenpura
9 years ago

  • Milestone set to 2.7

#5 @jacobsantos
9 years ago

  • Keywords has-patch needs-testing removed
  • Milestone 2.7 deleted
  • Resolution set to duplicate
  • Status changed from reopened to closed

tenpura, the problem won't be solved twice as fast when there are two tickets fixing the same problem. The other ticket also has a patch which does the same thing.

Closing again as duplicate of #7361. If you wish to add your updated patch to #7361, then please do so.

Note: See TracTickets for help on using tickets.