| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id: http_filter_api.c 292841 2009-12-31 08:48:57Z mike $ */
-
-#include "php_http.h"
+#include "php_http_api.h"
PHP_MINIT_FUNCTION(http_filter)
{
*bytes_consumed += ptr->buflen;
}
- php_http_buffer_appendf(&buf, "%lx" PHP_HTTP_CRLF, ptr->buflen);
+ 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);
}
if (ptr->buflen) {
- php_http_encoding_stream_update(buffer, ptr->buf, ptr->buflen, &encoded, &encoded_len TSRMLS_CC);
+ php_http_encoding_stream_update(buffer, ptr->buf, ptr->buflen, &encoded, &encoded_len);
if (encoded) {
if (encoded_len) {
out_avail = 1;
char *encoded = NULL;
size_t encoded_len = 0;
- php_http_encoding_stream_flush(buffer, &encoded, &encoded_len TSRMLS_CC);
+ php_http_encoding_stream_flush(buffer, &encoded, &encoded_len);
if (encoded) {
if (encoded_len) {
out_avail = 1;
char *encoded = NULL;
size_t encoded_len = 0;
- php_http_encoding_stream_finish(buffer, &encoded, &encoded_len TSRMLS_CC);
+ php_http_encoding_stream_finish(buffer, &encoded, &encoded_len);
if (encoded) {
if (encoded_len) {
out_avail = 1;
static PHP_HTTP_FILTER_DESTRUCTOR(zlib)
{
PHP_HTTP_FILTER_BUFFER(zlib) *buffer = (PHP_HTTP_FILTER_BUFFER(zlib) *) this->abstract;
- php_http_encoding_stream_free(&buffer TSRMLS_CC);
+ php_http_encoding_stream_free(&buffer);
}
static PHP_HTTP_FILTER_OPS(deflate) = {
if ((b = php_http_encoding_stream_init(NULL, php_http_encoding_stream_get_inflate_ops(), flags TSRMLS_CC))) {
if (!(f = php_stream_filter_alloc(&PHP_HTTP_FILTER_OP(inflate), b, p))) {
- php_http_encoding_stream_free(&b TSRMLS_CC);
+ php_http_encoding_stream_free(&b);
}
}
} else
if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void *) &tmp)) {
break;
}
+ /* no break */
default:
{
- zval *num = php_http_zsep(IS_LONG, *tmp);
+ zval *num = php_http_ztyp(IS_LONG, *tmp);
flags |= (Z_LVAL_P(num) & 0x0fffffff);
zval_ptr_dtor(&num);
+
}
+ break;
}
}
if ((b = php_http_encoding_stream_init(NULL, php_http_encoding_stream_get_deflate_ops(), flags TSRMLS_CC))) {
if (!(f = php_stream_filter_alloc(&PHP_HTTP_FILTER_OP(deflate), b, p))) {
- php_http_encoding_stream_free(&b TSRMLS_CC);
+ php_http_encoding_stream_free(&b);
}
}
}