X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_filter_api.c;h=02467decdb2844570151a79883d83d10ad9a89ca;hp=a942c1fd33df48ea3c7aea9dfbd01ab217cd481f;hb=669d2e6a8bdc642b6b52693f4593f199ddd7e8d2;hpb=213951e5268262c6dbea4b05b852510132f3367b diff --git a/http_filter_api.c b/http_filter_api.c index a942c1f..02467de 100644 --- a/http_filter_api.c +++ b/http_filter_api.c @@ -6,16 +6,12 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2005, Michael Wallner | + | Copyright (c) 2004-2006, Michael Wallner | +--------------------------------------------------------------------+ */ /* $Id$ */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - #define HTTP_WANT_ZLIB #include "php_http.h" @@ -78,7 +74,7 @@ PHP_MINIT_FUNCTION(http_filter) php_stream_bucket_append(buckets_out, __buck TSRMLS_CC); \ } -typedef struct { +typedef struct _http_chunked_decode_filter_buffer_t { phpstr buffer; ulong hexlen; } HTTP_FILTER_BUFFER(chunked_decode); @@ -169,8 +165,8 @@ static HTTP_FILTER_FUNCTION(chunked_decode) /* ignore preceeding CRLFs (too loose?) */ while (off < PHPSTR_LEN(buffer) && ( - PHPSTR_VAL(buffer)[off] == 0xa || - PHPSTR_VAL(buffer)[off] == 0xd)) { + PHPSTR_VAL(buffer)[off] == '\n' || + PHPSTR_VAL(buffer)[off] == '\r')) { ++off; } if (off) { @@ -488,7 +484,7 @@ static php_stream_filter *http_filter_create(const char *name, zval *params, int { case IS_ARRAY: case IS_OBJECT: - if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void **) &tmp)) { + if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void *) &tmp)) { break; } default: