Closed ajgarlag closed 7 years ago
A quick fix could be to implement a getSize
method in FilteredStream
to always return null
(allowed by PSR-7 when the size is unknown) and rewrite the tests to expect that null
value.
AFAIK, result size on the compression cannot be determined, but they may be headers for the decompression (not sure).
So :+1: for the null value as i don't see a way to do this unless we read up the whole stream ^^ which will make it non readable as we cannot seek a filtered stream (don't remember where is see this but using \php_user_filter make a stream not seekable)
that looks at least not wrong to me. i am :+1: to merge this. for future reference, can we do better than this for some of the stream types?
LGTM,
Could you rebase with the last PR merged (to remove conflict in the changelog), then it's fine for me
Sorry for the late response. Thanks.
What's in this PR?
This PR includes the tests required to expose the problem described in #60 about the invalid
getSize
returned value byFilteredStream
subclasses, and should include a fix.Why?
60 Invalid value returned by FilteredStream::getSize
Checklist
To Do