kriswallsmith/Buzz — pull request #60 by simensen (2012-03-26 17:22:56+00:00)
Title: Fixes new proxy code

Proxy format needs special scheme (tcp:// or ssl://) for stream proxies, port is always needed in all cases.

* It looks like the proxy handling for both cURL and native PHP streams requires a port to work
* I updated the URL utility to add default ports for HTTP and HTTPS to let people be able to specify
proxy as just and IP address or just an http:// address without a port. Not sure this is needed.
(causes tests to break — see below)
* For stream based proxies, needed to build out the URL correctly. As it was, the `getUrl` was a runtime
error since it did not exist.

Tests are broken with this patch. I see that master currently strips `:80` and `:443` for HTTP and HTTPS for `getHost`. I think these tests should work just fine once merged from master. Right now tests fail with the likes of "Expected http://example.com but Actual http://example.com:80".

I can rebase against master and make sure all of the tests work if you prefer. Please let me know!