X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_filter_api.c;h=421c07fb289e7455a35dde4c64af94c38d422a7e;hp=53877e2a3f08d3f4c281125009f856fc5813d46b;hb=10c37f199e6be7bdb5cbd8a58cbe30279d2d4d45;hpb=391c85f10c017e1e4de656b051c1bba009ede7b3 diff --git a/http_filter_api.c b/http_filter_api.c index 53877e2..421c07f 100644 --- a/http_filter_api.c +++ b/http_filter_api.c @@ -114,7 +114,7 @@ static HTTP_FILTER_FUNCTION(chunked_decode) /* we have data in our buffer */ while (PHPSTR_LEN(buffer)) { - + fprintf(stderr, ">>> loop\n"); /* we already know the size of the chunk and are waiting for data */ if (buffer->hexlen) { @@ -191,6 +191,9 @@ static HTTP_FILTER_FUNCTION(chunked_decode) phpstr_cut(PHPSTR(buffer), 0, eolstr + eollen - PHPSTR_VAL(buffer)); /* buffer->hexlen is 0 now or contains the size of the next chunk */ /* continue */ + } else { + /* we have not enough data buffered to read in chunk size */ + break; } } /* break */