X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fguzzlehttp%2Fguzzle%2Fsrc%2FHandler%2FStreamHandler.php;fp=vendor%2Fguzzlehttp%2Fguzzle%2Fsrc%2FHandler%2FStreamHandler.php;h=b686545ea7f1d44d0de79ee0343524fc2b68128f;hb=7b0cd87f0ae102b7185cb38e64b8e0ebf904ecb8;hp=b12bfd942398a63b3e6430e227dd05fa482e5a50;hpb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;p=yaffs-website diff --git a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php index b12bfd942..b686545ea 100644 --- a/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php +++ b/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php @@ -4,7 +4,6 @@ namespace GuzzleHttp\Handler; use GuzzleHttp\Exception\RequestException; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Promise\FulfilledPromise; -use GuzzleHttp\Promise\RejectedPromise; use GuzzleHttp\Promise\PromiseInterface; use GuzzleHttp\Psr7; use GuzzleHttp\TransferStats; @@ -61,6 +60,7 @@ class StreamHandler if (strpos($message, 'getaddrinfo') // DNS lookup failed || strpos($message, 'Connection refused') || strpos($message, "couldn't connect to host") // error on HHVM + || strpos($message, "connection attempt failed") ) { $e = new ConnectException($e->getMessage(), $request, $e); } @@ -103,7 +103,7 @@ class StreamHandler $status = $parts[1]; $reason = isset($parts[2]) ? $parts[2] : null; $headers = \GuzzleHttp\headers_from_lines($hdrs); - list ($stream, $headers) = $this->checkDecode($options, $headers, $stream); + list($stream, $headers) = $this->checkDecode($options, $headers, $stream); $stream = Psr7\stream_for($stream); $sink = $stream; @@ -276,7 +276,7 @@ class StreamHandler } $params = []; - $context = $this->getDefaultContext($request, $options); + $context = $this->getDefaultContext($request); if (isset($options['on_headers']) && !is_callable($options['on_headers'])) { throw new \InvalidArgumentException('on_headers must be callable'); @@ -307,7 +307,6 @@ class StreamHandler && isset($options['auth'][2]) && 'ntlm' == $options['auth'][2] ) { - throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); }