Skip to content

Instantly share code, notes, and snippets.

@kelunik

kelunik/bug80931.diff Secret

Created Apr 9, 2021
Embed
What would you like to do?
diff --git a/ext/standard/filters.c b/ext/standard/filters.c
index 466d352523..b954491d87 100644
--- a/ext/standard/filters.c
+++ b/ext/standard/filters.c
@@ -1867,6 +1867,11 @@ static php_stream_filter_status_t php_chunked_filter(
consumed += bucket->buflen;
bucket->buflen = php_dechunk(bucket->buf, bucket->buflen, data);
php_stream_bucket_append(buckets_out, bucket);
+
+ if (data->state == CHUNK_TRAILER) {
+ php_stream_xport_shutdown(stream, STREAM_SHUT_RDWR);
+ break;
+ }
}
if (bytes_consumed) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment