Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Ensure that responses with an indeterminate-length body have their content sent #1739
In cases where the body getSize() returns null and no length has been provided via header, no content will be sent due to ceil(null / $chunkSize) == 0. This affects custom body objects as would be used to stream data in cases where waiting for the body to be complete would be prohibitively expensive and no size can be determined in advance, for example the results of "tail -0f /var/log/messages | head" or "du -sk /home/*".
This fixes the issue by doing the loop without chunk counting if the size is not known.