ZF2-444: Http\Client\Adapter\Socket not returning valid response

Issue Type: Bug Created: 2012-08-02T21:21:51.000+0000 Last Updated: 2012-08-11T10:07:47.000+0000 Status: Resolved Fix version(s): Reporter: Thomas R. (thomas_r) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend\Http

  • adapter
  • client
  • http
  • response
  • socket

Related issues: Attachments:


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 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(''); $response = $this->httpClient->send();


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

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.