- fix write access of HttpMessage headers array in inherited context
[m6w6/ext-http] / http_response_object.c
index 6490238b2e966cbbfad9fb4ee4f0e44ddf818d3d..f7cb216c5ba4bbf0f52a31544f7080caff8cc813 100644 (file)
@@ -155,7 +155,6 @@ zend_function_entry http_response_object_fe[] = {
 
        {NULL, NULL, NULL}
 };
-static zend_object_handlers http_response_object_handlers;
 
 void _http_response_object_init(INIT_FUNC_ARGS)
 {
@@ -269,7 +268,7 @@ PHP_METHOD(HttpResponse, setCacheControl)
 
 #define HTTP_CACHECONTROL_TEMPLATE "%s, must-revalidate, max_age=%ld"
 
-       if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &ccontrol, &cc_len, &max_age)) {
+       if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &ccontrol, &cc_len, &max_age)) {
                RETURN_FALSE;
        }
 
@@ -470,7 +469,7 @@ PHP_METHOD(HttpResponse, getBufferSize)
  */
 PHP_METHOD(HttpResponse, setData)
 {
-       zval *the_data, **data;
+       zval *the_data;
 
        if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &the_data)) {
                RETURN_FALSE;
@@ -602,7 +601,7 @@ PHP_METHOD(HttpResponse, getFile)
  */
 PHP_METHOD(HttpResponse, send)
 {
-       zval *do_cache, *do_gzip, *sent;
+       zval *sent;
        zend_bool clean_ob = 1;
 
        if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &clean_ob)) {
@@ -649,15 +648,13 @@ PHP_METHOD(HttpResponse, send)
 
        /* gzip */
        if (Z_LVAL_P(GET_STATIC_PROP(gzip))) {
-               php_start_ob_buffer_named("ob_gzhandler", 0, 0 TSRMLS_CC);
+               php_start_ob_buffer_named("ob_gzhandler", 0, 1 TSRMLS_CC);
        } else {
                php_start_ob_buffer(NULL, 0, 0 TSRMLS_CC);
        }
 
        /* caching */
        if (Z_LVAL_P(GET_STATIC_PROP(cache))) {
-               char *cc_hdr;
-               int cc_len;
                zval *cctl, *etag, *lmod;
 
                etag = GET_STATIC_PROP(eTag);