zend-http icon indicating copy to clipboard operation
zend-http copied to clipboard

Unprintable chars in headers led to response parsing error

Open necromant2005 opened this issue 9 years ago • 1 comments

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 2015-06-30_0724

necromant2005 avatar Aug 27 '15 07:08 necromant2005

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.

weierophinney avatar Dec 31 '19 22:12 weierophinney