summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-11-13 18:54:37 +0000
committerZeev Suraski <zeev@php.net>2000-11-13 18:54:37 +0000
commit0f7f5c2c0e616445d14b49641e85dbddcc1651e5 (patch)
tree83f0bce3ba6ba891798d828e5ad1c0334739513e /main/SAPI.c
parent9b42296babc97defd3b7635b395506d5539aae20 (diff)
downloadphp-git-0f7f5c2c0e616445d14b49641e85dbddcc1651e5.tar.gz
- Import Jade Nicoletti's transparent gzip encoding support as an output
handler. Works quite nicely! - Fix buglets in output buffering - Add output_handler INI directive
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 563f1cd072..67bd8019de 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -271,6 +271,7 @@ SAPI_API void sapi_activate(SLS_D)
SG(request_info).post_data = NULL;
SG(request_info).current_user = NULL;
SG(request_info).current_user_length = 0;
+ SG(request_info).no_headers = 0;
/* It's possible to override this general case in the activate() callback, if
* necessary.
@@ -363,7 +364,7 @@ SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bo
char *colon_offset;
SLS_FETCH();
- if (SG(headers_sent)) {
+ if (SG(headers_sent) && !SG(request_info).no_headers) {
char *output_start_filename = php_get_output_start_filename();
int output_start_lineno = php_get_output_start_lineno();
@@ -457,7 +458,7 @@ SAPI_API int sapi_send_headers()
int ret = FAILURE;
SLS_FETCH();
- if (SG(headers_sent)) {
+ if (SG(headers_sent) || SG(request_info).no_headers) {
return SUCCESS;
}