header that is not normally needed).
; **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
; **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
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;
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) {