- unset the time condition option in curl properly if we unset the lastmodified option
[m6w6/ext-http] / http_response_object.c
index 72289b65f291fc71025eb04262abb32fdd03695c..a617c9f1c942b7dc3884a3f9f24c757ebef01bc1 100644 (file)
@@ -214,10 +214,11 @@ zend_function_entry http_response_object_fe[] = {
        EMPTY_FUNCTION_ENTRY
 };
 
-void _http_response_object_init(INIT_FUNC_ARGS)
+PHP_MINIT_FUNCTION(http_response_object)
 {
        HTTP_REGISTER_CLASS(HttpResponse, http_response_object, NULL, 0);
        http_response_object_declare_default_properties();
+       return SUCCESS;
 }
 
 static inline void _http_response_object_declare_default_properties(TSRMLS_D)
@@ -1105,17 +1106,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)))