-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Http Client with Curl / default adapter and transfer-encoding chunked: Error parsing body - doesn't seem to be a chunked message #7683
Comments
This may not be relevant but in the past I've found that curl sometimes has trouble with chunked responses. To work around the issue I had to set the HTTP version to 1.0.
|
So I did more investigation and found the culprit in Zend\Http\Client\Adapter\Curl.php:437:
Should be:
Notice the 'i' in the regex. It should be a case insensitive match as HTTP headers are case insensitive: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html |
See pull request: zendframework/zend-http#53 |
Isn't that a duplicate of zendframework/zend-http#19 Any idea when this would be fixed? |
This issue has been moved from the |
Fixed in zendframework/zend-http#53. |
Once I set the adapter to Socket, it works, but with Curl or the default adapter (which I assume is Curl), I get this message on chunked encodings. From looking at other tickets and my own experience with prior Zend versions, it looks like the Socket adapter used to be unable to handle the chunked transfer encoding while the Curl one was able to and now that has flipped in ZF 2.5.3. In 2.2.10 for example, I'm 99.9% sure it's the other way.
The text was updated successfully, but these errors were encountered: