ID:               27026
 Comment by:       michael at neko dot cc
 Reported By:      achowe at snert dot com
 Status:           Closed
 Bug Type:         CGI related
 Operating System: *
 PHP Version:      4CVS, 5CVS
 Assigned To:      edink
 New Comment:

I am interested in this fix too - for Windows. I just downloaded the
lastest CVS for Win32 (php4-win32-STABLE-200410210430), and I cannot
see the fix in there. Can anyone confirm & please fix it ASAP? 

That is, entering
header("HTTP/1.0 200 OK");
doesn't explicitly emit the status it seems, however for anything else
like 201, you will see "Status: 201"


Previous Comments:
------------------------------------------------------------------------

[2004-02-09 19:09:15] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2004-01-29 02:08:19] achowe at snert dot com

Creating yet another option seems a bit much when you know that an nph
chi will have to set the header in the code. Why can't you just say if
the header is explicitly set, then print it regardless of its value.

For me I see it as inconsistant behaviour. If I do nothing, I get no
header, if I  set the status header to 200, I still don't get a status
header even though I put code in to explicitly send it. If I specify
anything anything other that 200, I get a status header. 

So my work around has been to send an undefined 2xx header to indicate
undefined success, though not exactly what I would have liked. So far
Mozilla, Opera, Internet Explorer, and Lynx appear to work, while Links
does not (though I suspect for unrelated issue).

#!/usr/local/bin/php-cgi
<?
        header("HTTP/1.0 299 OK");
        phpinfo();
?>

------------------------------------------------------------------------

[2004-01-29 00:26:15] [EMAIL PROTECTED]

Maybe we should have some php.ini option to enable nph mode?
e.g. "cgi.non_parsed_headers" which defaults to 0 ?



------------------------------------------------------------------------

[2004-01-25 00:22:17] [EMAIL PROTECTED]

>From cgi_main.c CVS log:

revision 1.190.2.4
date: 2002/11/22 13:50:40;  author: edink;  state: Exp;  lines: +10 -7
Don't send default http status (200) (Thanks to Sascha Schumann for
idea).

Edin, can you handle this report please. :)


------------------------------------------------------------------------

[2004-01-23 15:42:27] achowe at snert dot com

Description:
------------
While testing a 3rd party HTTP server (under Cygwin) that expects nph
CGI behaviour, I have the following script:

#!/usr/local/bin/php-cgi
<?
        header("HTTP/1.0 200 OK");
        phpinfo();
?>

When called, the "HTTP/1.0 200 OK" line is never sent. If I rewrite the
script to change the status code:

#!/usr/local/bin/php-cgi
<?
        header("HTTP/1.0 300 OK");
        phpinfo();
?>

Only then does the "HTTP/1.0 300 OK" appear as expected.  This result
can be verified by a telnet connection to the server or on the command
line.







Expected result:
----------------
If I explicitly set:    

    header("HTTP/1.0 200 OK");

then I expect to see it in the output as the first line.




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27026&edit=1

Reply via email to