php_stream_filter *this, \
php_stream_bucket_brigade *buckets_in, \
php_stream_bucket_brigade *buckets_out, \
php_stream_filter *this, \
php_stream_bucket_brigade *buckets_in, \
php_stream_bucket_brigade *buckets_out, \
#define PHP_HTTP_FILTER_DTOR(filter) \
http_filter_ ##filter## _dtor
#define PHP_HTTP_FILTER_DESTRUCTOR(filter) \
#define PHP_HTTP_FILTER_DTOR(filter) \
http_filter_ ##filter## _dtor
#define PHP_HTTP_FILTER_DESTRUCTOR(filter) \
- __buck = php_stream_bucket_new(stream, __data, length, 1, this->is_persistent TSRMLS_CC); \
+ __buck = php_stream_bucket_new(stream, __data, length, 1, this->is_persistent); \
php_http_buffer_cut(PHP_HTTP_BUFFER(buffer), 0, eolstr + eollen - PHP_HTTP_BUFFER(buffer)->data);
/* buffer->hexlen is 0 now or contains the size of the next chunk */
if (!buffer->hexlen) {
php_http_buffer_cut(PHP_HTTP_BUFFER(buffer), 0, eolstr + eollen - PHP_HTTP_BUFFER(buffer)->data);
/* buffer->hexlen is 0 now or contains the size of the next chunk */
if (!buffer->hexlen) {
- php_stream_notify_info(stream->context, PHP_STREAM_NOTIFY_COMPLETED, NULL, 0);
+ php_stream_notify_info(PHP_STREAM_CONTEXT(stream), PHP_STREAM_NOTIFY_COMPLETED, NULL, 0);
php_http_buffer_dtor(PHP_HTTP_BUFFER(b));
pefree(b, this->is_persistent);
php_http_buffer_dtor(PHP_HTTP_BUFFER(b));
pefree(b, this->is_persistent);
php_http_buffer_appendf(&buf, "%lx" PHP_HTTP_CRLF, (long unsigned int) ptr->buflen);
php_http_buffer_append(&buf, ptr->buf, ptr->buflen);
php_http_buffer_appends(&buf, PHP_HTTP_CRLF);
php_http_buffer_appendf(&buf, "%lx" PHP_HTTP_CRLF, (long unsigned int) ptr->buflen);
php_http_buffer_append(&buf, ptr->buf, ptr->buflen);
php_http_buffer_appends(&buf, PHP_HTTP_CRLF);
NEW_BUCKET(buf.data, buf.used);
/* reset */
php_http_buffer_reset(&buf);
NEW_BUCKET(buf.data, buf.used);
/* reset */
php_http_buffer_reset(&buf);
static PHP_HTTP_FILTER_FUNCTION(zlib)
{
php_stream_bucket *ptr, *nxt;
static PHP_HTTP_FILTER_FUNCTION(zlib)
{
php_stream_bucket *ptr, *nxt;
php_http_encoding_stream_update(buffer, ptr->buf, ptr->buflen, &encoded, &encoded_len);
#if DBG_FILTER
php_http_encoding_stream_update(buffer, ptr->buf, ptr->buflen, &encoded, &encoded_len);
#if DBG_FILTER
php_stream_filter *f = NULL;
int flags = p ? PHP_HTTP_ENCODING_STREAM_PERSISTENT : 0;
if (params) {
switch (Z_TYPE_P(params)) {
php_stream_filter *f = NULL;
int flags = p ? PHP_HTTP_ENCODING_STREAM_PERSISTENT : 0;
if (params) {
switch (Z_TYPE_P(params)) {
- case IS_ARRAY:
- case IS_OBJECT:
- if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void *) &tmp)) {
- break;
- }
- /* no break */
- default:
- {
- zval *num = php_http_ztyp(IS_LONG, *tmp);
-
- flags |= (Z_LVAL_P(num) & 0x0fffffff);
- zval_ptr_dtor(&num);
-
+ case IS_ARRAY:
+ case IS_OBJECT:
+ if (!(tmp = zend_hash_str_find_ind(HASH_OF(params), ZEND_STRL("flags")))) {
+ break;
if (!strcasecmp(name, "http.inflate")) {
PHP_HTTP_FILTER_BUFFER(zlib) *b = NULL;
if (!strcasecmp(name, "http.inflate")) {
PHP_HTTP_FILTER_BUFFER(zlib) *b = NULL;
- if ((b = php_http_encoding_stream_init(NULL, php_http_encoding_stream_get_inflate_ops(), flags TSRMLS_CC))) {
+ if ((b = php_http_encoding_stream_init(NULL, php_http_encoding_stream_get_inflate_ops(), flags))) {
if (!(f = php_stream_filter_alloc(&PHP_HTTP_FILTER_OP(inflate), b, p))) {
php_http_encoding_stream_free(&b);
}
if (!(f = php_stream_filter_alloc(&PHP_HTTP_FILTER_OP(inflate), b, p))) {
php_http_encoding_stream_free(&b);
}
if (!strcasecmp(name, "http.deflate")) {
PHP_HTTP_FILTER_BUFFER(zlib) *b = NULL;
if (!strcasecmp(name, "http.deflate")) {
PHP_HTTP_FILTER_BUFFER(zlib) *b = NULL;
- if ((b = php_http_encoding_stream_init(NULL, php_http_encoding_stream_get_deflate_ops(), flags TSRMLS_CC))) {
+ if ((b = php_http_encoding_stream_init(NULL, php_http_encoding_stream_get_deflate_ops(), flags))) {
if (!(f = php_stream_filter_alloc(&PHP_HTTP_FILTER_OP(deflate), b, p))) {
php_http_encoding_stream_free(&b);
}
if (!(f = php_stream_filter_alloc(&PHP_HTTP_FILTER_OP(deflate), b, p))) {
php_http_encoding_stream_free(&b);
}