zend-http
zend-http copied to clipboard
Unprintable chars in headers led to response parsing error
The issue was in non-printable symbol between those 2 lines in response from moz blog. I suppose it was added as some kind of bots protection by your cdn provider.
$client = new \Zend\Http\Client();
$client->setOptions(array(
'sslverifypeer' => false,
'adapter' => 'Zend\Http\Client\Adapter\Curl',
));
$client->setUri('https://moz.com/ugc');
$response = $client->send(); // Invalid header value
The symbol is between: X-Iinfo && X-CDN headers
This repository has been closed and moved to laminas/laminas-http; a new issue has been opened at https://github.com/laminas/laminas-http/issues/24.