Opened 5 years ago
Closed 4 years ago
#8226 closed defect (bug) (duplicate)
WP returns invalid status headers when PHP runs as CGI
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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 (2)
Change History (7)
comment:2
jacobsantos — 4 years ago
- Milestone 2.7 deleted
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #7361.
- Resolution duplicate deleted
- Status changed from closed to reopened
functions.php is not fixed yet.
See 8226.diff.
comment:5
jacobsantos — 4 years ago
- Keywords has-patch needs-testing removed
- Milestone 2.7 deleted
- Resolution set to duplicate
- Status changed from reopened to closed
Note: See
TracTickets for help on using
tickets.

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