New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that responses with an indeterminate-length body have their content sent #1739

merged 1 commit into from Feb 5, 2016


None yet
2 participants

jj101k commented Jan 18, 2016

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.

@akrabat akrabat added this to the 3.2.0 milestone Feb 5, 2016

@akrabat akrabat self-assigned this Feb 5, 2016

akrabat added a commit to akrabat/Slim that referenced this pull request Feb 5, 2016

@akrabat akrabat merged commit 3cff1cd into slimphp:3.x Feb 5, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.

Show comment
Hide comment

akrabat Feb 5, 2016


Good catch. Thank you!


akrabat commented Feb 5, 2016

Good catch. Thank you!

@akrabat akrabat added the bug fix label Feb 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment