summaryrefslogtreecommitdiff
path: root/sapi/cgi
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2004-02-10 00:03:44 +0000
committerIlia Alshanetsky <iliaa@php.net>2004-02-10 00:03:44 +0000
commit86337bac189e0a4b868afe8f24a5a3959ebdfdcd (patch)
treef30eb0ca8860fa896c6e55379439209e9ff311b6 /sapi/cgi
parent125d5a2b738a9cd0b525f4d75cbfd32fd3496149 (diff)
downloadphp-git-86337bac189e0a4b868afe8f24a5a3959ebdfdcd.tar.gz
MFH: Fixed bug #27026 (Added cgi.nph that allows forcing of the Status: 200
header that is not normally needed).
Diffstat (limited to 'sapi/cgi')
-rw-r--r--sapi/cgi/cgi_main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 2c8946cae2..292ccfdf6d 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -293,7 +293,7 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
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 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
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) {