X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=http_filter_api.c;h=2553d681113728bbbe727deb95fc2c7b4ad91fe3;hb=062146a765cc4cce698764f46547ee209e73966c;hp=35cff1cdb2b837937cc6418c26ebd2e8462e260d;hpb=4fcbd8e8ae31611c5197ff2369673b5939fc2b80;p=m6w6%2Fext-http diff --git a/http_filter_api.c b/http_filter_api.c index 35cff1c..2553d68 100644 --- a/http_filter_api.c +++ b/http_filter_api.c @@ -74,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); @@ -165,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) {