summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Schlossnagle <gschlossnagle@php.net>2002-12-25 21:14:55 +0000
committerGeorge Schlossnagle <gschlossnagle@php.net>2002-12-25 21:14:55 +0000
commit45f5605f387df47a8cbfc8ea4a63cf5624e3ba83 (patch)
tree85ed61b87f75c98b9e0ae300bbcc28e7126b0cc0
parent6c3558c2ac63a5b28e645fbc482d418065c7d5e7 (diff)
downloadphp-git-45f5605f387df47a8cbfc8ea4a63cf5624e3ba83.tar.gz
mfh (bug #21177)
-rw-r--r--sapi/cgi/cgi_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 9025657392..04279cc0f6 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -265,6 +265,9 @@ static int sapi_cgi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
zend_llist_position pos;
long rfc2616_headers = 0;
+ if(SG(request_info).no_headers == 1) {
+ return SAPI_HEADER_SENT_SUCCESSFULLY;
+ }
/* Check wheater to send RFC2616 style headers compatible with
* PHP versions 4.2.3 and earlier compatible with web servers
* such as IIS. Default is informal CGI RFC header compatible
@@ -1379,6 +1382,10 @@ consult the installation file that came with this distribution, or visit \n\
php_module_shutdown(TSRMLS_C);
return FAILURE;
}
+ if (no_headers) {
+ SG(headers_sent) = 1;
+ SG(request_info).no_headers = 1;
+ }
/* This actually destructs the elements of the list - ugly hack */
zend_llist_apply(&global_vars, (llist_apply_func_t) php_register_command_line_global_vars TSRMLS_CC);