cvs: php-src /main SAPI.c
| From: | Michael Wallner | Date: | Wed, 30 Aug 2006 12:25:56 +0000 |
| Subject: | cvs: php-src /main SAPI.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-40185@lists.php.net to get a copy of this message | ||
mike Wed Aug 30 12:25:56 2006 UTC
Modified files:
/php-src/main SAPI.c
Log:
- the Vary header for zlib.output_compression is now handled inside the output handler
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.c?r1=1.216&r2=1.217&diff_format=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.216 php-src/main/SAPI.c:1.217
--- php-src/main/SAPI.c:1.216 Sat Jun 3 11:19:44 2006
+++ php-src/main/SAPI.c Wed Aug 30 12:25:56 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: SAPI.c,v 1.216 2006/06/03 11:19:44 mike Exp $ */
+/* $Id: SAPI.c,v 1.217 2006/08/30 12:25:56 mike Exp $ */
#include <ctype.h>
#include <sys/stat.h>
@@ -719,37 +719,6 @@
return SUCCESS;
}
-#if HAVE_ZLIB
- /* TODO: move to zlib.c */
- /* Add output compression headers at this late stage in order to make
- it possible to switch it off inside the script. */
-
- if (zend_ini_long("zlib.output_compression",
sizeof("zlib.output_compression"), 0)) {
- zval nm_zlib_get_coding_type;
- zval *uf_result = NULL;
-
- ZVAL_STRINGL(&nm_zlib_get_coding_type, "zlib_get_coding_type",
sizeof("zlib_get_coding_type") - 1, 0);
-
- if (call_user_function_ex(CG(function_table), NULL, &nm_zlib_get_coding_type, &uf_result,
0, NULL, 1, NULL TSRMLS_CC) != FAILURE && uf_result != NULL && Z_TYPE_P(uf_result)
== IS_STRING) {
- char buf[128];
- int len;
-
- assert(Z_STRVAL_P(uf_result) != NULL);
-
- len = snprintf(buf, sizeof(buf), "Content-Encoding: %s", Z_STRVAL_P(uf_result));
- if (len <= 0 || sapi_add_header(buf, len, 1) == FAILURE) {
- return FAILURE;
- }
- if (sapi_add_header_ex("Vary: Accept-Encoding", sizeof("Vary:
Accept-Encoding") - 1, 1, 0 TSRMLS_CC) == FAILURE) {
- return FAILURE;
- }
- }
- if (uf_result != NULL) {
- zval_ptr_dtor(&uf_result);
- }
- }
-#endif
-
/* Success-oriented. We set headers_sent to 1 here to avoid an infinite loop
* in case of an error situation.
*/