- relicense with a BSD style license
[m6w6/ext-http] / http_response_object.c
index 9193590266ebbf31cd116c6d8189bffd1e1f05e6..e255989e7fbcc21c4fb84b139cf0d0a4c7b4d218 100644 (file)
@@ -1,16 +1,13 @@
 /*
-   +----------------------------------------------------------------------+
-   | PECL :: http                                                         |
-   +----------------------------------------------------------------------+
-   | This source file is subject to version 3.0 of the PHP license, that  |
-   | is bundled with this package in the file LICENSE, and is available   |
-   | through the world-wide-web at http://www.php.net/license/3_0.txt.    |
-   | If you did not receive a copy of the PHP license and are unable to   |
-   | obtain it through the world-wide-web, please send a note to          |
-   | license@php.net so we can mail you a copy immediately.               |
-   +----------------------------------------------------------------------+
-   | Copyright (c) 2004-2005 Michael Wallner <mike@php.net>               |
-   +----------------------------------------------------------------------+
+    +--------------------------------------------------------------------+
+    | PECL :: http                                                       |
+    +--------------------------------------------------------------------+
+    | Redistribution and use in source and binary forms, with or without |
+    | modification, are permitted provided that the conditions mentioned |
+    | in the accompanying LICENSE file are met.                          |
+    +--------------------------------------------------------------------+
+    | Copyright (c) 2004-2005, Michael Wallner <mike@php.net>            |
+    +--------------------------------------------------------------------+
 */
 
 /* $Id$ */
@@ -1106,17 +1103,14 @@ PHP_METHOD(HttpResponse, send)
        }
 
        /* throttling */
-       {
-               HTTP_G(send).buffer_size    = Z_LVAL_P(convert_to_type_ex(IS_LONG, GET_STATIC_PROP(bufferSize)));
-               HTTP_G(send).throttle_delay = Z_DVAL_P(convert_to_type_ex(IS_DOUBLE, GET_STATIC_PROP(throttleDelay)));
-       }
+       HTTP_G(send).buffer_size    = Z_LVAL_P(convert_to_type_ex(IS_LONG, GET_STATIC_PROP(bufferSize)));
+       HTTP_G(send).throttle_delay = Z_DVAL_P(convert_to_type_ex(IS_DOUBLE, GET_STATIC_PROP(throttleDelay)));
 
        /* gzip */
-       if (zval_is_true(GET_STATIC_PROP(gzip))) {
-               php_start_ob_buffer_named("ob_gzhandler", HTTP_G(send).buffer_size, 0 TSRMLS_CC);
-       } else {
-               php_start_ob_buffer(NULL, HTTP_G(send).buffer_size, 0 TSRMLS_CC);
-       }
+       HTTP_G(send).gzip_encoding = zval_is_true(GET_STATIC_PROP(gzip));
+       
+       /* start ob */
+       php_start_ob_buffer(NULL, HTTP_G(send).buffer_size, 0 TSRMLS_CC);
 
        /* send */
        switch (Z_LVAL_P(GET_STATIC_PROP(mode)))