Properly pass TSRMLS to php_ob_handler_used
[m6w6/ext-http] / http_api.c
index 1943e126a1f4d5193c6ca36d26e75cb09a71097a..dbd8ab8452fc888ae1b1b9e3874f323884136f5f 100644 (file)
@@ -253,7 +253,7 @@ STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header
                return FAILURE;
        }
        
-       if (!php_ob_handler_used("zlib output compression") && !php_ob_handler_used("ob_gzhandler") && !OG(ob_lock)) {
+       if (!php_ob_handler_used("zlib output compression" TSRMLS_CC) && !php_ob_handler_used("ob_gzhandler" TSRMLS_CC) && !OG(ob_lock)) {
                php_end_ob_buffers(0 TSRMLS_CC);
        }
        if ((SUCCESS == sapi_send_headers(TSRMLS_C)) && body) {
@@ -356,6 +356,7 @@ PHP_HTTP_API STATUS _http_get_request_body_ex(char **body, size_t *length, zend_
                HTTP_G->read_post_data = 1;
                
                while (0 < (len = sapi_module.read_post(buf, 4096 TSRMLS_CC))) {
+                       SG(read_post_bytes) += len;
                        *body = erealloc(*body, *length + len + 1);
                        memcpy(*body + *length, buf, len);
                        *length += len;