Browse files

Use port correctly, this was broken anyway

  • Loading branch information...
1 parent 0da00af commit 7b9e723d258ab2ee46dd00d931b855283669c827 Beau Simensen committed Mar 26, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/Buzz/Client/Curl.php
View
6 lib/Buzz/Client/Curl.php
@@ -142,10 +142,8 @@ protected function prepare(Message\Request $request, Message\Response $response,
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, $this->verifyPeer);
if ($proxy = $this->getProxy()) {
- // We actually need the port otherwise curl croaks. Had initially
- // tried proxy->getHost() and it did not work since it removed the
- // port it matched the scheme default.
- curl_setopt($curl, CURLOPT_PROXY, $proxy->getHost().':'.$proxy->getPort());
+ curl_setopt($curl, CURLOPT_PROXY, $proxy->getHostname());
+ curl_setopt($curl, CURLOPT_PROXYPORT, $proxy->getPort());
if ($user = $proxy->getUser()) {
curl_setopt($curl, CURLOPT_PROXYUSERPWD, $user.':'.$proxy->getPassword());
} else {

0 comments on commit 7b9e723

Please sign in to comment.