You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a narrative description of what you are trying to accomplish:
We are using the stream HTTP response to directly stream file content from S3 to clients.
As we are dealing with video files we are using the the Range/Content-Range headers to allow clients to download specific parts of files.
To be able to do so we use the Zend\Http\Response\Stream::setContentLength method together with fseek to define the parts of the file to send.
Where Stream::readStream is dealing with the content length it's not handled in SimpleStreamResponseSender and the stream gets send until EOF.
To fix that this PR uses stream_copy_to_stream to php://output instead of fpassthru if a content length has been defined.
Are you fixing a bug?
Detail how the bug is invoked currently.
Detail the original, incorrect behavior.
Detail the new, expected behavior.
Base your feature on the master branch, and submit against that branch.
Add a regression test that demonstrates the bug, and proves the fix.
Add a CHANGELOG.md entry for the fix.
Are you creating a new feature?
Why is the new feature needed? What purpose does it serve?
How will users use the new feature?
Base your feature on the develop branch, and submit against that branch.
Add only one feature per pull request; split multiple features over multiple pull requests
Provide a narrative description of what you are trying to accomplish:
We are using the stream HTTP response to directly stream file content from S3 to clients.
As we are dealing with video files we are using the the
Range
/Content-Range
headers to allow clients to download specific parts of files.To be able to do so we use the
Zend\Http\Response\Stream::setContentLength
method together withfseek
to define the parts of the file to send.Where
Stream::readStream
is dealing with the content length it's not handled inSimpleStreamResponseSender
and the stream gets send until EOF.To fix that this PR uses
stream_copy_to_stream
tophp://output
instead offpassthru
if a content length has been defined.Are you fixing a bug?
master
branch, and submit against that branch.CHANGELOG.md
entry for the fix.Are you creating a new feature?
develop
branch, and submit against that branch.CHANGELOG.md
entry for the new feature.Is this related to quality assurance?
Is this related to documentation?
Originally posted by @marc-mabe at zendframework/zend-mvc#315
The text was updated successfully, but these errors were encountered: