Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
222
Merge Requests
222
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
c7afd229
Commit
c7afd229
authored
Jul 18, 2014
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2304081
by damiankloip: Upgrade Guzzle to version 4.1.3.
parent
01d85e15
Changes
45
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
45 changed files
with
1972 additions
and
1007 deletions
+1972
-1007
composer.lock
composer.lock
+17
-23
core/vendor/composer/ClassLoader.php
core/vendor/composer/ClassLoader.php
+4
-3
core/vendor/composer/autoload_real.php
core/vendor/composer/autoload_real.php
+0
-3
core/vendor/composer/installed.json
core/vendor/composer/installed.json
+122
-122
core/vendor/guzzlehttp/guzzle/CHANGELOG.md
core/vendor/guzzlehttp/guzzle/CHANGELOG.md
+27
-0
core/vendor/guzzlehttp/guzzle/composer.json
core/vendor/guzzlehttp/guzzle/composer.json
+7
-3
core/vendor/guzzlehttp/guzzle/docs/_static/logo.png
core/vendor/guzzlehttp/guzzle/docs/_static/logo.png
+1
-4
core/vendor/guzzlehttp/guzzle/docs/clients.rst
core/vendor/guzzlehttp/guzzle/docs/clients.rst
+9
-9
core/vendor/guzzlehttp/guzzle/docs/quickstart.rst
core/vendor/guzzlehttp/guzzle/docs/quickstart.rst
+6
-6
core/vendor/guzzlehttp/guzzle/docs/testing.rst
core/vendor/guzzlehttp/guzzle/docs/testing.rst
+1
-5
core/vendor/guzzlehttp/guzzle/src/Adapter/Curl/CurlFactory.php
...vendor/guzzlehttp/guzzle/src/Adapter/Curl/CurlFactory.php
+1
-4
core/vendor/guzzlehttp/guzzle/src/Adapter/StreamAdapter.php
core/vendor/guzzlehttp/guzzle/src/Adapter/StreamAdapter.php
+15
-10
core/vendor/guzzlehttp/guzzle/src/ClientInterface.php
core/vendor/guzzlehttp/guzzle/src/ClientInterface.php
+1
-1
core/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
core/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php
+21
-4
core/vendor/guzzlehttp/guzzle/src/Event/RequestEvents.php
core/vendor/guzzlehttp/guzzle/src/Event/RequestEvents.php
+36
-0
core/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php
core/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php
+17
-5
core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php
core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php
+47
-174
core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php
core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php
+13
-9
core/vendor/guzzlehttp/guzzle/src/Query.php
core/vendor/guzzlehttp/guzzle/src/Query.php
+21
-31
core/vendor/guzzlehttp/guzzle/src/QueryParser.php
core/vendor/guzzlehttp/guzzle/src/QueryParser.php
+163
-0
core/vendor/guzzlehttp/guzzle/src/Url.php
core/vendor/guzzlehttp/guzzle/src/Url.php
+18
-11
core/vendor/guzzlehttp/guzzle/src/functions.php
core/vendor/guzzlehttp/guzzle/src/functions.php
+294
-289
core/vendor/guzzlehttp/guzzle/tests/Adapter/Curl/CurlFactoryTest.php
.../guzzlehttp/guzzle/tests/Adapter/Curl/CurlFactoryTest.php
+21
-0
core/vendor/guzzlehttp/guzzle/tests/Adapter/StreamAdapterTest.php
...dor/guzzlehttp/guzzle/tests/Adapter/StreamAdapterTest.php
+30
-12
core/vendor/guzzlehttp/guzzle/tests/Cookie/CookieJarTest.php
core/vendor/guzzlehttp/guzzle/tests/Cookie/CookieJarTest.php
+14
-0
core/vendor/guzzlehttp/guzzle/tests/Event/RequestEventsTest.php
...endor/guzzlehttp/guzzle/tests/Event/RequestEventsTest.php
+56
-0
core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php
...or/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php
+49
-0
core/vendor/guzzlehttp/guzzle/tests/Post/MultipartBodyTest.php
...vendor/guzzlehttp/guzzle/tests/Post/MultipartBodyTest.php
+19
-26
core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php
core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php
+30
-0
core/vendor/guzzlehttp/guzzle/tests/QueryParserTest.php
core/vendor/guzzlehttp/guzzle/tests/QueryParserTest.php
+80
-0
core/vendor/guzzlehttp/guzzle/tests/QueryTest.php
core/vendor/guzzlehttp/guzzle/tests/QueryTest.php
+21
-88
core/vendor/guzzlehttp/guzzle/tests/Server.php
core/vendor/guzzlehttp/guzzle/tests/Server.php
+2
-2
core/vendor/guzzlehttp/guzzle/tests/UrlTest.php
core/vendor/guzzlehttp/guzzle/tests/UrlTest.php
+6
-1
core/vendor/guzzlehttp/guzzle/tests/server.js
core/vendor/guzzlehttp/guzzle/tests/server.js
+6
-6
core/vendor/guzzlehttp/streams/CHANGELOG.rst
core/vendor/guzzlehttp/streams/CHANGELOG.rst
+19
-0
core/vendor/guzzlehttp/streams/composer.json
core/vendor/guzzlehttp/streams/composer.json
+2
-2
core/vendor/guzzlehttp/streams/src/AppendStream.php
core/vendor/guzzlehttp/streams/src/AppendStream.php
+212
-0
core/vendor/guzzlehttp/streams/src/GuzzleStreamWrapper.php
core/vendor/guzzlehttp/streams/src/GuzzleStreamWrapper.php
+110
-0
core/vendor/guzzlehttp/streams/src/LimitStream.php
core/vendor/guzzlehttp/streams/src/LimitStream.php
+3
-1
core/vendor/guzzlehttp/streams/src/Stream.php
core/vendor/guzzlehttp/streams/src/Stream.php
+26
-10
core/vendor/guzzlehttp/streams/src/StreamInterface.php
core/vendor/guzzlehttp/streams/src/StreamInterface.php
+10
-3
core/vendor/guzzlehttp/streams/src/functions.php
core/vendor/guzzlehttp/streams/src/functions.php
+143
-139
core/vendor/guzzlehttp/streams/tests/AppendStreamTest.php
core/vendor/guzzlehttp/streams/tests/AppendStreamTest.php
+160
-0
core/vendor/guzzlehttp/streams/tests/GuzzleStreamWrapperTest.php
...ndor/guzzlehttp/streams/tests/GuzzleStreamWrapperTest.php
+100
-0
core/vendor/guzzlehttp/streams/tests/StreamTest.php
core/vendor/guzzlehttp/streams/tests/StreamTest.php
+12
-1
No files found.
composer.lock
View file @
c7afd229
...
...
@@ -459,21 +459,21 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "4.1.
0
",
"version": "4.1.
3
",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "
85a0ba7de064493c928a8bcdc5eef01e0bde9953
"
"reference": "
012b2aecbda4e38f119c19580898685851015fa7
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/
85a0ba7de064493c928a8bcdc5eef01e0bde9953
",
"reference": "
85a0ba7de064493c928a8bcdc5eef01e0bde9953
",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/
012b2aecbda4e38f119c19580898685851015fa7
",
"reference": "
012b2aecbda4e38f119c19580898685851015fa7
",
"shasum": ""
},
"require": {
"ext-json": "*",
"guzzlehttp/streams": "~1.
0
",
"guzzlehttp/streams": "~1.
3
",
"php": ">=5.4.0"
},
"require-dev": {
...
...
@@ -487,7 +487,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "4.
0
.x-dev"
"dev-master": "4.
1
.x-dev"
}
},
"autoload": {
...
...
@@ -520,32 +520,32 @@
"rest",
"web service"
],
"time": "2014-0
5-28 05:13:19
"
"time": "2014-0
7-16 03:01:02
"
},
{
"name": "guzzlehttp/streams",
"version": "1.
0
.0",
"version": "1.
3
.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/streams.git",
"reference": "d
249beffe5fa5e0da3855974bcc2dd9082069ccf
"
"reference": "d
6aaa91cfdbae86355dd2a168a3ca536755898a2
"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/streams/zipball/d
249beffe5fa5e0da3855974bcc2dd9082069ccf
",
"reference": "d
249beffe5fa5e0da3855974bcc2dd9082069ccf
",
"url": "https://api.github.com/repos/guzzle/streams/zipball/d
6aaa91cfdbae86355dd2a168a3ca536755898a2
",
"reference": "d
6aaa91cfdbae86355dd2a168a3ca536755898a2
",
"shasum": ""
},
"require": {
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "
4.*
"
"phpunit/phpunit": "
~4.0
"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.
0
.x-dev"
"dev-master": "1.
2
.x-dev"
}
},
"autoload": {
...
...
@@ -573,7 +573,7 @@
"Guzzle",
"stream"
],
"time": "2014-0
3-25 18:31:28
"
"time": "2014-0
7-15 22:02:02
"
},
{
"name": "kriswallsmith/assetic",
...
...
@@ -2393,12 +2393,8 @@
"time": "2013-06-12 19:46:58"
}
],
"packages-dev": [
],
"aliases": [
],
"packages-dev": [],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
"symfony/yaml": 20,
...
...
@@ -2411,7 +2407,5 @@
"platform": {
"php": ">=5.4.2"
},
"platform-dev": [
]
"platform-dev": []
}
core/vendor/composer/ClassLoader.php
View file @
c7afd229
...
...
@@ -202,10 +202,11 @@ public function set($prefix, $paths)
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix
The prefix/namespace, with trailing '\\'
* @param array|string $paths
The PSR-4 base directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
*/
public
function
setPsr4
(
$prefix
,
$paths
)
{
public
function
setPsr4
(
$prefix
,
$paths
)
{
if
(
!
$prefix
)
{
$this
->
fallbackDirsPsr4
=
(
array
)
$paths
;
}
else
{
...
...
core/vendor/composer/autoload_real.php
View file @
c7afd229
...
...
@@ -23,9 +23,6 @@ public static function getLoader()
self
::
$loader
=
$loader
=
new
\
Composer\Autoload\ClassLoader
();
spl_autoload_unregister
(
array
(
'ComposerAutoloaderInitDrupal8'
,
'loadClassLoader'
));
$vendorDir
=
dirname
(
__DIR__
);
$baseDir
=
dirname
(
dirname
(
$vendorDir
));
$includePaths
=
require
__DIR__
.
'/include_paths.php'
;
array_push
(
$includePaths
,
get_include_path
());
set_include_path
(
join
(
PATH_SEPARATOR
,
$includePaths
));
...
...
core/vendor/composer/installed.json
View file @
c7afd229
...
...
@@ -1623,61 +1623,6 @@
"description"
:
"Symfony Yaml Component"
,
"homepage"
:
"http://symfony.com"
},
{
"name"
:
"guzzlehttp/streams"
,
"version"
:
"1.0.0"
,
"version_normalized"
:
"1.0.0.0"
,
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://github.com/guzzle/streams.git"
,
"reference"
:
"d249beffe5fa5e0da3855974bcc2dd9082069ccf"
},
"dist"
:
{
"type"
:
"zip"
,
"url"
:
"https://api.github.com/repos/guzzle/streams/zipball/d249beffe5fa5e0da3855974bcc2dd9082069ccf"
,
"reference"
:
"d249beffe5fa5e0da3855974bcc2dd9082069ccf"
,
"shasum"
:
""
},
"require"
:
{
"php"
:
">=5.4.0"
},
"require-dev"
:
{
"phpunit/phpunit"
:
"4.*"
},
"time"
:
"2014-03-25 18:31:28"
,
"type"
:
"library"
,
"extra"
:
{
"branch-alias"
:
{
"dev-master"
:
"1.0.x-dev"
}
},
"installation-source"
:
"dist"
,
"autoload"
:
{
"psr-4"
:
{
"GuzzleHttp\\Stream\\"
:
"src/"
},
"files"
:
[
"src/functions.php"
]
},
"notification-url"
:
"https://packagist.org/downloads/"
,
"license"
:
[
"MIT"
],
"authors"
:
[
{
"name"
:
"Michael Dowling"
,
"email"
:
"mtdowling@gmail.com"
,
"homepage"
:
"https://github.com/mtdowling"
}
],
"description"
:
"Provides a simple abstraction over streams of data (Guzzle 4+)"
,
"homepage"
:
"http://guzzlephp.org/"
,
"keywords"
:
[
"Guzzle"
,
"stream"
]
},
{
"name"
:
"symfony/css-selector"
,
"version"
:
"v2.4.4"
,
...
...
@@ -1733,73 +1678,6 @@
"description"
:
"Symfony CssSelector Component"
,
"homepage"
:
"http://symfony.com"
},
{
"name"
:
"guzzlehttp/guzzle"
,
"version"
:
"4.1.0"
,
"version_normalized"
:
"4.1.0.0"
,
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://github.com/guzzle/guzzle.git"
,
"reference"
:
"85a0ba7de064493c928a8bcdc5eef01e0bde9953"
},
"dist"
:
{
"type"
:
"zip"
,
"url"
:
"https://api.github.com/repos/guzzle/guzzle/zipball/85a0ba7de064493c928a8bcdc5eef01e0bde9953"
,
"reference"
:
"85a0ba7de064493c928a8bcdc5eef01e0bde9953"
,
"shasum"
:
""
},
"require"
:
{
"ext-json"
:
"*"
,
"guzzlehttp/streams"
:
"~1.0"
,
"php"
:
">=5.4.0"
},
"require-dev"
:
{
"ext-curl"
:
"*"
,
"phpunit/phpunit"
:
"~4.0"
,
"psr/log"
:
"~1.0"
},
"suggest"
:
{
"ext-curl"
:
"Guzzle will use specific adapters if cURL is present"
},
"time"
:
"2014-05-28 05:13:19"
,
"type"
:
"library"
,
"extra"
:
{
"branch-alias"
:
{
"dev-master"
:
"4.0.x-dev"
}
},
"installation-source"
:
"dist"
,
"autoload"
:
{
"psr-4"
:
{
"GuzzleHttp\\"
:
"src/"
},
"files"
:
[
"src/functions.php"
]
},
"notification-url"
:
"https://packagist.org/downloads/"
,
"license"
:
[
"MIT"
],
"authors"
:
[
{
"name"
:
"Michael Dowling"
,
"email"
:
"mtdowling@gmail.com"
,
"homepage"
:
"https://github.com/mtdowling"
}
],
"description"
:
"Guzzle is a PHP HTTP client library and framework for building RESTful web service clients"
,
"homepage"
:
"http://guzzlephp.org/"
,
"keywords"
:
[
"client"
,
"curl"
,
"framework"
,
"http"
,
"http client"
,
"rest"
,
"web service"
]
},
{
"name"
:
"sebastian/version"
,
"version"
:
"1.0.3"
,
...
...
@@ -2470,5 +2348,127 @@
"mock"
,
"xunit"
]
},
{
"name"
:
"guzzlehttp/streams"
,
"version"
:
"1.3.0"
,
"version_normalized"
:
"1.3.0.0"
,
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://github.com/guzzle/streams.git"
,
"reference"
:
"d6aaa91cfdbae86355dd2a168a3ca536755898a2"
},
"dist"
:
{
"type"
:
"zip"
,
"url"
:
"https://api.github.com/repos/guzzle/streams/zipball/d6aaa91cfdbae86355dd2a168a3ca536755898a2"
,
"reference"
:
"d6aaa91cfdbae86355dd2a168a3ca536755898a2"
,
"shasum"
:
""
},
"require"
:
{
"php"
:
">=5.4.0"
},
"require-dev"
:
{
"phpunit/phpunit"
:
"~4.0"
},
"time"
:
"2014-07-15 22:02:02"
,
"type"
:
"library"
,
"extra"
:
{
"branch-alias"
:
{
"dev-master"
:
"1.2.x-dev"
}
},
"installation-source"
:
"dist"
,
"autoload"
:
{
"psr-4"
:
{
"GuzzleHttp\\Stream\\"
:
"src/"
},
"files"
:
[
"src/functions.php"
]
},
"notification-url"
:
"https://packagist.org/downloads/"
,
"license"
:
[
"MIT"
],
"authors"
:
[
{
"name"
:
"Michael Dowling"
,
"email"
:
"mtdowling@gmail.com"
,
"homepage"
:
"https://github.com/mtdowling"
}
],
"description"
:
"Provides a simple abstraction over streams of data (Guzzle 4+)"
,
"homepage"
:
"http://guzzlephp.org/"
,
"keywords"
:
[
"Guzzle"
,
"stream"
]
},
{
"name"
:
"guzzlehttp/guzzle"
,
"version"
:
"4.1.3"
,
"version_normalized"
:
"4.1.3.0"
,
"source"
:
{
"type"
:
"git"
,
"url"
:
"https://github.com/guzzle/guzzle.git"
,
"reference"
:
"012b2aecbda4e38f119c19580898685851015fa7"
},
"dist"
:
{
"type"
:
"zip"
,
"url"
:
"https://api.github.com/repos/guzzle/guzzle/zipball/012b2aecbda4e38f119c19580898685851015fa7"
,
"reference"
:
"012b2aecbda4e38f119c19580898685851015fa7"
,
"shasum"
:
""
},
"require"
:
{
"ext-json"
:
"*"
,
"guzzlehttp/streams"
:
"~1.3"
,
"php"
:
">=5.4.0"
},
"require-dev"
:
{
"ext-curl"
:
"*"
,
"phpunit/phpunit"
:
"~4.0"
,
"psr/log"
:
"~1.0"
},
"suggest"
:
{
"ext-curl"
:
"Guzzle will use specific adapters if cURL is present"
},
"time"
:
"2014-07-16 03:01:02"
,
"type"
:
"library"
,
"extra"
:
{
"branch-alias"
:
{
"dev-master"
:
"4.1.x-dev"
}
},
"installation-source"
:
"dist"
,
"autoload"
:
{
"psr-4"
:
{
"GuzzleHttp\\"
:
"src/"
},
"files"
:
[
"src/functions.php"
]
},
"notification-url"
:
"https://packagist.org/downloads/"
,
"license"
:
[
"MIT"
],
"authors"
:
[
{
"name"
:
"Michael Dowling"
,
"email"
:
"mtdowling@gmail.com"
,
"homepage"
:
"https://github.com/mtdowling"
}
],
"description"
:
"Guzzle is a PHP HTTP client library and framework for building RESTful web service clients"
,
"homepage"
:
"http://guzzlephp.org/"
,
"keywords"
:
[
"client"
,
"curl"
,
"framework"
,
"http"
,
"http client"
,
"rest"
,
"web service"
]
}
]
core/vendor/guzzlehttp/guzzle/CHANGELOG.md
View file @
c7afd229
CHANGELOG
=========
4.
1.3 (2014-07-15)
------------------
*
Various fixes to multipart/form-data POST uploads
*
Wrapping function.php in an if-statement to ensure Guzzle can be used
globally and in a Composer install
*
Fixed an issue with generating and merging in events to an event array
*
POST headers are only applied before sending a request to allow you to change
the query aggregator used before uploading
*
Added much more robust query string parsing
*
Fixed various parsing and normalization issues with URLs
*
Fixing an issue where multi-valued headers were not being utilized correctly
in the StreamAdapter
4.
1.2 (2014-06-18)
------------------
*
Added support for sending payloads with GET requests
4.
1.1 (2014-06-08)
------------------
*
Fixed an issue related to using custom message factory options in subclasses
*
Fixed an issue with nested form fields in a multi-part POST
*
Fixed an issue with using the
`json`
request option for POST requests
*
Added
`ToArrayInterface`
to
`GuzzleHttp\Cookie\CookieJar`
4.
1.0 (2014-05-27)
------------------
...
...
core/vendor/guzzlehttp/guzzle/composer.json
View file @
c7afd229
...
...
@@ -17,7 +17,7 @@
"require"
:
{
"php"
:
">=5.4.0"
,
"ext-json"
:
"*"
,
"guzzlehttp/streams"
:
"~1.
0
"
"guzzlehttp/streams"
:
"~1.
3
"
},
"suggest"
:
{
...
...
@@ -30,7 +30,11 @@
},
"files"
:
[
"src/functions.php"
]
},
"autoload-dev"
:
{
"psr-4"
:
{
"GuzzleHttp\\Tests\\"
:
"tests/"
}
},
"require-dev"
:
{
"ext-curl"
:
"*"
,
"psr/log"
:
"~1.0"
,
...
...
@@ -39,7 +43,7 @@
"extra"
:
{
"branch-alias"
:
{
"dev-master"
:
"4.
0
.x-dev"
"dev-master"
:
"4.
1
.x-dev"
}
}
}
core/vendor/guzzlehttp/guzzle/docs/_static/logo.png
View replaced file @
01d85e15
View file @
c7afd229
243 KB
|
W:
|
H:
242 KB
|
W:
|
H:
2-up
Swipe
Onion skin
core/vendor/guzzlehttp/guzzle/docs/clients.rst
View file @
c7afd229
...
...
@@ -70,7 +70,7 @@ base URL that is a URI template with parameters.
use GuzzleHttp\Client;
$client = new Client([
'base_url' => ['https://api.twitter.com/{version}', ['version' => 'v1.1']],
'base_url' => ['https://api.twitter.com/{version}
/
', ['version' => 'v1.1']],
'defaults' => [
'headers' => ['Foo' => 'Bar'],
'query' => ['testing' => '123'],
...
...
@@ -203,7 +203,7 @@ The ``sendAll()`` method accepts the following associative array of options:
The "before", "complete", and "error" event options accept a callable or an
array of associative arrays where each associative array contains a "fn" key
with a callable value, an optional "priority" key representing the event
priority (with a default value
is
0), and an optional "once" key that can be
priority (with a default value
of
0), and an optional "once" key that can be
set to true so that the event listener will be removed from the request after
it is first triggered.
...
...
@@ -289,7 +289,7 @@ Throwing Errors Immediately
~~~~~~~~~~~~~~~~~~~~~~~~~~~
It sometimes is useful to throw exceptions immediately when the occur. The
following ex
ma
ple shows how to use an event listener to throw exceptions
following ex
am
ple shows how to use an event listener to throw exceptions
immeditaley and prevent subsequent requests from being sent.
.. code-block:: php
...
...
@@ -308,7 +308,7 @@ Batching Requests
-----------------
Sometimes you just want to send a few requests in parallel and then process
the results all at once after they've sent. Guzzle provides a convenience
the results all at once after they've
been
sent. Guzzle provides a convenience
function ``GuzzleHttp\batch()`` that makes this very simple:
.. code-block:: php
...
...
@@ -339,7 +339,7 @@ function ``GuzzleHttp\batch()`` that makes this very simple:
``GuzzleHttp\batch()`` accepts an optional associative array of options in the
third argument that allows you to specify the 'before', 'complete' and 'error'
events as well as specify the maximum number of request to send in parallel
events as well as specify the maximum number of request
s
to send in parallel
using the 'parallel' option key. This options array is the exact same format as
the options array exposed in ``GuzzleHttp\ClientInterface::sendAll()``.
...
...
@@ -699,7 +699,7 @@ to an open Guzzle stream:
events
------
:Summary: A
ssociative array mapping event names to a callable. o
r an
:Summary: A
n associative array mapping event names to a callable. O
r an
associative array containing the 'fn' key that maps to a callable, an
optional 'priority' key used to specify the event priority, and an optional
'once' key used to specify if the event should remove itself the first time
...
...
@@ -896,7 +896,7 @@ Pass a string to specify a proxy for all protocols.
.. code-block:: php
$client->get('/', ['proxy' => 'tcp://localhost:812
4
']);
$client->get('/', ['proxy' => 'tcp://localhost:812
5
']);
Pass an associative array to specify HTTP proxies for specific URI schemes
(i.e., "http", "https").
...
...
@@ -905,7 +905,7 @@ Pass an associative array to specify HTTP proxies for specific URI schemes
$client->get('/', [
'proxy' => [
'http' => 'tcp://localhost:812
4
', // Use this proxy with "http"
'http' => 'tcp://localhost:812
5
', // Use this proxy with "http"
'https' => 'tcp://localhost:9124' // Use this proxy with "https"
]
]);
...
...
@@ -1103,7 +1103,7 @@ behavior of the library.
``HTTP_PROXY``
Defines the proxy to use when sending requests using the "http" protocol.
``HTTPS_PROXY``
Defines the proxy to use when sending requests using the "https"
:
protocol.
Defines the proxy to use when sending requests using the "https" protocol.
Relevant ini Settings
---------------------
...
...
core/vendor/guzzlehttp/guzzle/docs/quickstart.rst
View file @
c7afd229
...
...
@@ -18,7 +18,7 @@ easily test the client.
Procedural API
--------------
Here's an example of sending a ``
GE
T`` request using the procedural API.
Here's an example of sending a ``
POS
T`` request using the procedural API.
.. code-block:: php
...
...
@@ -377,7 +377,7 @@ Guzzle can maintain a cookie session for you if instructed using the
- Set to ``true`` to use a shared cookie session associated with the client.
- Pass an associative array containing cookies to send in the request and start
a new cookie session.
- Set to a ``GuzzleHttp\Subscriber\CookieJar\CookieJarInterface`` object to us
s
- Set to a ``GuzzleHttp\Subscriber\CookieJar\CookieJarInterface`` object to us
e
an existing cookie jar.
Redirects
...
...
@@ -437,7 +437,7 @@ Guzzle throws exceptions for errors that occur during a transfer.
}
}
- A ``GuzzleHttp\Exception\ClientE
rrorResponseE
xception`` is thrown for 400
- A ``GuzzleHttp\Exception\ClientException`` is thrown for 400
level errors if the ``exceptions`` request option is set to true. This
exception extends from ``GuzzleHttp\Exception\BadResponseException`` and
``GuzzleHttp\Exception\BadResponseException`` extends from
...
...
@@ -445,16 +445,16 @@ Guzzle throws exceptions for errors that occur during a transfer.
.. code-block:: php
use GuzzleHttp\Exception\ClientE
rrorResponseE
xception;
use GuzzleHttp\Exception\ClientException;
try {
$client->get('https://github.com/_abc_123_404');
} catch (ClientE
rrorResponseE
xception $e) {
} catch (ClientException $e) {
echo $e->getRequest();
echo $e->getResponse();
}
- A ``GuzzleHttp\Exception\ServerE
rrorResponse
`` is thrown for 500 level
- A ``GuzzleHttp\Exception\ServerE
xception
`` is thrown for 500 level
errors if the ``exceptions`` request option is set to true. This
exception extends from ``GuzzleHttp\Exception\BadResponseException``.
- A ``GuzzleHttp\Exception\TooManyRedirectsException`` is thrown when too
...
...
core/vendor/guzzlehttp/guzzle/docs/testing.rst
View file @
c7afd229
...
...
@@ -173,16 +173,12 @@ Guzzle ships with a node.js test server that receives requests and returns
responses from a queue. The test server exposes a simple API that is used to
enqueue responses and inspect the requests that it has received.
In order to use the web server, you'll need to manually require
``tests/Server.php``. Any operation on the ``Server`` object will ensure that
Any operation on the ``Server`` object will ensure that
the server is running and wait until it is able to receive requests before
returning.
.. code-block:: php
// Require the test server (using something like this).
require __DIR__ . '/../vendor/guzzlehttp/guzzle/tests/Server.php';
use GuzzleHttp\Client;
use GuzzleHttp\Tests\Server;
...
...
core/vendor/guzzlehttp/guzzle/src/Adapter/Curl/CurlFactory.php
View file @
c7afd229
...
...
@@ -97,10 +97,7 @@ protected function getDefaultOptions(
private
function
applyMethod
(
RequestInterface
$request
,
array
&
$options
)
{
$method
=
$request
->
getMethod
();
if
(
$method
==
'GET'
)
{
$options
[
CURLOPT_HTTPGET
]
=
true
;
unset
(
$options
[
CURLOPT_READFUNCTION
]);
}
elseif
(
$method
==
'HEAD'
)
{
if
(
$method
==
'HEAD'
)
{
$options
[
CURLOPT_NOBODY
]
=
true
;
unset
(
$options
[
CURLOPT_WRITEFUNCTION
],
$options
[
CURLOPT_READFUNCTION
]);
}
else
{
...
...
core/vendor/guzzlehttp/guzzle/src/Adapter/StreamAdapter.php
View file @
c7afd229
...
...
@@ -100,18 +100,9 @@ private function createResponseObject(
$options
[
'reason_phrase'
]
=
$parts
[
2
];
}
// Set the size on the stream if it was returned in the response
$responseHeaders
=
[];
foreach
(
$headers
as
$header
)
{
$headerParts
=
explode
(
':'
,
$header
,
2
);
$responseHeaders
[
$headerParts
[
0
]]
=
isset
(
$headerParts
[
1
])