Ticket #8226 (closed defect (bug): duplicate)

Opened 2 months ago

Last modified 1 month ago

WP returns invalid status headers when PHP runs as CGI

Reported by: tenpura Assigned to: anonymous
Priority: normal Milestone:
Component: General Version: 2.7
Severity: normal Keywords:
Cc:

Description

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');

instead.

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

Attachments

8226.diff (0.7 kB) - added by tenpura on 11/15/08 16:08:53.
8226.2.diff (1.0 kB) - added by ryan on 11/20/08 21:03:04.
Unified patch plus explanatory comment

Change History

11/15/08 16:08:53 changed by tenpura

  • attachment 8226.diff added.

11/18/08 08:26:19 changed by snakefoot

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');

11/20/08 21:03:04 changed by ryan

  • attachment 8226.2.diff added.

Unified patch plus explanatory comment

11/25/08 23:40:35 changed by jacobsantos

  • status changed from new to closed.
  • resolution set to duplicate.
  • milestone deleted.

Duplicate of #7361.

11/26/08 01:36:47 changed by tenpura

  • status changed from closed to reopened.
  • resolution deleted.

functions.php is not fixed yet.

See 8226.diff.

11/26/08 01:54:50 changed by tenpura

  • milestone set to 2.7.

11/26/08 05:52:29 changed by jacobsantos

  • keywords deleted.
  • status changed from reopened to closed.
  • resolution set to duplicate.
  • milestone deleted.

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.