Skip to content

Commit

Permalink
Adding missing CURLOPT_PROXYUSERPWD option in Curl Adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeus authored and markstory committed Sep 9, 2018
1 parent ec33e6f commit 4ab2d03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Http/Client/Adapter/Curl.php
Expand Up @@ -121,6 +121,10 @@ public function buildOptions(Request $request, array $options)
if (isset($options['proxy']['proxy'])) {
$out[CURLOPT_PROXY] = $options['proxy']['proxy'];
}
if (isset($options['proxy']['username'])) {
$password = !empty($options['proxy']['password']) ? $options['proxy']['password'] : '';
$out[CURLOPT_PROXYUSERPWD] = $options['proxy']['username'] . ':' . $password;
}
if (isset($options['curl']) && is_array($options['curl'])) {
// Can't use array_merge() because keys will be re-ordered.
foreach ($options['curl'] as $key => $value) {
Expand Down

0 comments on commit 4ab2d03

Please sign in to comment.