Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
ChunkedBody decoding with Curl Adapter #19
Zend\Http\Response::decodeChunkedBody fail with exception when curl adapter decode body itself , BUT it still has "Transfer-Encoding: encoded" header
php: 5.5 , 5.6, 7
It looks like you're leaving off the
At any rate, in this case, it looks like the problem is that the server you're talking to sends the header in lowercase:
Header names are case-insensitive by definition, and the values for Transfer-Encoding are also case-insensitive, so just adding the
This would be fixed by the open PR #10, and this issue serves as an example of the kind of bug that currently happens and that PR would fix.
Specifically, this looks like a regression introduced by ddf5a83: the comparisons were case-sensitive at that point, and when adding support for varying whitespace, the insensitivity was accidentally not applied to the new regex version of the code.