kriswallsmith/Buzz — pull request #64 by Burgov (2012-04-11 09:57:42+00:00)
Title: Added new client: Samson\Protocol\Protocol\HTTP

This PR adds an optional dependency: samson/protocol.

The problem with Curl is that it isn't available on all installations and file_get_contents refuses to actually fetch contents if the return status is any other dan 2xx, meaning you can't get the actual error message for, for example, a 404 or 500 response.

This adds a third client, named Protocol. This one tries to do an HTTP request using bare sockets. The socket classes appear to be more common in PHP installations than CURL, so it should almost always work.

I ran the tests using the server.php script and they work as expected.