From: [EMAIL PROTECTED]
Operating system:
PHP version: 4.0.5
PHP Bug Type: HTTP related
Bug description: PHP should support Status-headerline
Apache returns HTTP-status code according to Status:-header line returned
by a cgi-script. PHP should do that too because it's a good feature to
support that behavior to allow script-writers return custom
status-codes.
Status is not a real HTTP header but a HTTP-server could return e.g.
"HTTP/1.0 404" from a cgi-script. But it doesn't work that way for PHP
when running as a module inside Apache. It could.
e.g.
<?php
if (file_exists($file))
echo mtime($file);
else
header("Status: 404 Not Found");
?>
In Apache it's done this way
But this doesn't get done for PHP when running as a module.
(Apache 1.3.9 util-script.c
ap_scan_script_header_err_core(...)
{
...
/*
* If the script returned a specific status, that's what
* we'll use - otherwise we assume 200 OK.
*/
else if (!strcasecmp(w, "Status")) {
r->status = cgi_status = atoi(l);
r->status_line = ap_pstrdup(r->pool, l);
}
...
--
Edit bug report at http://bugs.php.net/?id=15994&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=15994&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=15994&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=15994&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=15994&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=15994&r=support
Expected behavior: http://bugs.php.net/fix.php?id=15994&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=15994&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=15994&r=submittedtwice