X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fguzzlehttp%2Fguzzle%2Fsrc%2FClient.php;fp=vendor%2Fguzzlehttp%2Fguzzle%2Fsrc%2FClient.php;h=de4df8a5ca144db7192d89f72f7cbba742573906;hp=2e4ceadef4063ab21f26ddbfa257ae06ea4aecdc;hb=3f4e21847e67242d3000b01156783f25594f7333;hpb=8acec36f19c470dfcda1ae2336826a782f41874c diff --git a/vendor/guzzlehttp/guzzle/src/Client.php b/vendor/guzzlehttp/guzzle/src/Client.php index 2e4ceadef..de4df8a5c 100644 --- a/vendor/guzzlehttp/guzzle/src/Client.php +++ b/vendor/guzzlehttp/guzzle/src/Client.php @@ -63,6 +63,8 @@ class Client implements ClientInterface { if (!isset($config['handler'])) { $config['handler'] = HandlerStack::create(); + } elseif (!is_callable($config['handler'])) { + throw new \InvalidArgumentException('handler must be a callable'); } // Convert the base_uri to a UriInterface @@ -350,6 +352,10 @@ class Client implements ClientInterface $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST; $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; break; + case 'ntlm': + $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM; + $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; + break; } } @@ -402,7 +408,7 @@ class Client implements ClientInterface throw new \InvalidArgumentException('Passing in the "body" request ' . 'option as an array to send a POST request has been deprecated. ' . 'Please use the "form_params" request option to send a ' - . 'application/x-www-form-urlencoded request, or a the "multipart" ' + . 'application/x-www-form-urlencoded request, or the "multipart" ' . 'request option to send a multipart/form-data request.'); } }