ZF2-444: Http\Client\Adapter\Socket not returning valid response
Description
Socket is the default adapter for client, and is having issues / connecting to the majority of sites. The simple code below triggers an exception that returns an empty string and thus the exception is thrown on Response::fromString which is called by Socket. Strangely it can handle a connection to google.com. So, I'm guessing there's a header that's missing or conversely, is present and confusing it?
$this->httpClient = new Client; $this->httpClient->setUri('http://framework.zend.com'); $response = $this->httpClient->send();
Comments
Posted by Thomas R. (thomas_r) on 2012-08-02T21:23:46.000+0000
Socket::read is the method that's triggering Response::fromString causing the exception to occur. Maybe read should throw an exception itself?
Posted by Maks 3w (maks3w) on 2012-08-11T10:07:47.000+0000
Fixed in 2.0.0rc3