Skip to content

Instantly share code, notes, and snippets.

@cmb69

cmb69/.diff Secret

Created April 9, 2021 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmb69/d722f1ee4d47e293e1830e339d83efa9 to your computer and use it in GitHub Desktop.
Save cmb69/d722f1ee4d47e293e1830e339d83efa9 to your computer and use it in GitHub Desktop.
Fix? for bug #80931 regarding chunked transfer-encoding
ext/standard/filters.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ext/standard/filters.c b/ext/standard/filters.c
index 018270c730..c5e92a0ea5 100644
--- a/ext/standard/filters.c
+++ b/ext/standard/filters.c
@@ -1988,6 +1988,9 @@ static php_stream_filter_status_t php_chunked_filter(
bucket = php_stream_bucket_make_writeable(buckets_in->head);
consumed += bucket->buflen;
bucket->buflen = php_dechunk(bucket->buf, bucket->buflen, data);
+ if (data->state == CHUNK_TRAILER) {
+ stream->eof = 1;
+ }
php_stream_bucket_append(buckets_out, bucket);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment