diff options
author | Zeev Suraski <zeev@php.net> | 2000-11-13 18:54:37 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2000-11-13 18:54:37 +0000 |
commit | 0f7f5c2c0e616445d14b49641e85dbddcc1651e5 (patch) | |
tree | 83f0bce3ba6ba891798d828e5ad1c0334739513e /main/SAPI.c | |
parent | 9b42296babc97defd3b7635b395506d5539aae20 (diff) | |
download | php-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.c | 5 |
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; } |