if (ctx->chunked) {
ctx->chunked_filter = php_stream_filter_create("http.chunked_encode", NULL, 0);
- php_stream_filter_append(&ctx->stream->writefilters, ctx->chunked_filter);
+ if (ctx->chunked_filter) {
+ php_stream_filter_append(&ctx->stream->writefilters, ctx->chunked_filter);
+ }
}
return ctx->started ? SUCCESS : FAILURE;