iliaa Mon Feb 9 19:03:45 2004 EDT Modified files: (Branch: PHP_4_3) /php-src NEWS php.ini-dist php.ini-recommended /php-src/sapi/cgi cgi_main.c Log: MFH: Fixed bug #27026 (Added cgi.nph that allows forcing of the Status: 200 header that is not normally needed). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.555&r2=1.1247.2.556&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.555 php-src/NEWS:1.1247.2.556 --- php-src/NEWS:1.1247.2.555 Mon Feb 9 18:28:46 2004 +++ php-src/NEWS Mon Feb 9 19:03:43 2004 @@ -9,6 +9,8 @@ - Fixed bug #27171 (crash inside gmp_hamdist()). (Jani) - Fixed bug #27149 (broken CLOB support in oci8 extension). (Antony) - Fixed bug #27135 (Possible crash inside mb_strlen()). (Moriyoshi) +- Fixed bug #27026 (Added cgi.nph that allows forcing of the Status: 200 + header that is not normally needed). (Ilia) - Fixed bug #24773 (unseting of strings as arrays causes a crash). (Sara) 03 Feb 2004, Version 4.3.5RC2 http://cvs.php.net/diff.php/php-src/php.ini-dist?r1=1.171.2.18&r2=1.171.2.19&ty=u Index: php-src/php.ini-dist diff -u php-src/php.ini-dist:1.171.2.18 php-src/php.ini-dist:1.171.2.19 --- php-src/php.ini-dist:1.171.2.18 Mon Sep 1 12:25:23 2003 +++ php-src/php.ini-dist Mon Feb 9 19:03:43 2004 @@ -438,6 +438,10 @@ ; **You CAN safely turn this off for IIS, in fact, you MUST.** ; cgi.force_redirect = 1 +; if cgi.nph is enabled it will force cgi to always sent Status: 200 with +; every request. +; cgi.nph = 1 + ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP ; will look for to know it is OK to continue execution. Setting this variable MAY http://cvs.php.net/diff.php/php-src/php.ini-recommended?r1=1.119.2.16&r2=1.119.2.17&ty=u Index: php-src/php.ini-recommended diff -u php-src/php.ini-recommended:1.119.2.16 php-src/php.ini-recommended:1.119.2.17 --- php-src/php.ini-recommended:1.119.2.16 Mon Sep 1 12:25:23 2003 +++ php-src/php.ini-recommended Mon Feb 9 19:03:43 2004 @@ -453,6 +453,10 @@ ; **You CAN safely turn this off for IIS, in fact, you MUST.** ; cgi.force_redirect = 1 +; if cgi.nph is enabled it will force cgi to always sent Status: 200 with +; every request. +; cgi.nph = 1 + ; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape ; (iPlanet) web servers, you MAY need to set an environment variable name that PHP ; will look for to know it is OK to continue execution. Setting this variable MAY http://cvs.php.net/diff.php/php-src/sapi/cgi/cgi_main.c?r1=1.190.2.53&r2=1.190.2.54&ty=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.190.2.53 php-src/sapi/cgi/cgi_main.c:1.190.2.54 --- php-src/sapi/cgi/cgi_main.c:1.190.2.53 Mon Jan 19 14:57:17 2004 +++ php-src/sapi/cgi/cgi_main.c Mon Feb 9 19:03:44 2004 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.190.2.53 2004/01/19 19:57:17 helly Exp $ */ +/* $Id: cgi_main.c,v 1.190.2.54 2004/02/10 00:03:44 iliaa Exp $ */ #include "php.h" #include "php_globals.h" @@ -293,7 +293,7 @@ char buf[SAPI_CGI_MAX_HEADER_LENGTH]; sapi_header_struct *h; zend_llist_position pos; - long rfc2616_headers = 0; + long rfc2616_headers = 0, nph = 0; if(SG(request_info).no_headers == 1) { return SAPI_HEADER_SENT_SUCCESSFULLY; @@ -307,7 +307,11 @@ rfc2616_headers = 0; } - if (SG(sapi_headers).http_response_code != 200) { + if (cfg_get_long("cgi.nph", &nph) == FAILURE) { + nph = 0; + } + + if (nph || SG(sapi_headers).http_response_code != 200) { int len; if (rfc2616_headers && SG(sapi_headers).http_status_line) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php