ZF2-444: Http\Client\Adapter\Socket not returning valid response
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();