From d806a9bb87f7826a35f404a14e7eacffc45e79d9 Mon Sep 17 00:00:00 2001
From: webchick <drupal@webchick.net>
Date: Wed, 5 Nov 2014 00:16:16 -0800
Subject: [PATCH] Issue #2369107 by lussoluca: Update Guzzle to 5.0.3.

---
 composer.lock                                 |  12 +-
 core/vendor/composer/installed.json           | 120 ++++-----
 core/vendor/guzzlehttp/guzzle/CHANGELOG.md    | 243 ++++++++----------
 core/vendor/guzzlehttp/guzzle/Makefile        |   4 +-
 core/vendor/guzzlehttp/guzzle/README.md       |  10 +-
 core/vendor/guzzlehttp/guzzle/composer.json   |   2 +-
 core/vendor/guzzlehttp/guzzle/docs/events.rst |   4 +-
 core/vendor/guzzlehttp/guzzle/docs/faq.rst    |   4 +-
 .../guzzlehttp/guzzle/docs/handlers.rst       |   2 +-
 .../guzzlehttp/guzzle/src/ClientInterface.php |   2 +-
 .../src/Event/AbstractTransferEvent.php       |  15 +-
 .../guzzle/src/Exception/RequestException.php |   2 +-
 .../guzzle/src/Message/Response.php           |   6 +-
 .../guzzle/src/Message/ResponseInterface.php  |   4 +-
 core/vendor/guzzlehttp/guzzle/src/Pool.php    |  16 ++
 .../guzzle/src/Post/MultipartBody.php         |   4 +-
 .../guzzlehttp/guzzle/src/Post/PostBody.php   |   7 +-
 core/vendor/guzzlehttp/guzzle/src/Query.php   |  40 ++-
 .../guzzlehttp/guzzle/src/RingBridge.php      |   4 +-
 core/vendor/guzzlehttp/guzzle/src/Url.php     | 117 ++++++---
 .../tests/Event/AbstractTransferEventTest.php |   1 +
 .../tests/Message/MessageFactoryTest.php      |   2 +-
 .../guzzlehttp/guzzle/tests/PoolTest.php      |  12 +
 .../guzzle/tests/Post/PostBodyTest.php        |  14 +
 .../guzzlehttp/guzzle/tests/QueryTest.php     |  13 +
 .../guzzlehttp/guzzle/tests/UrlTest.php       |  25 +-
 26 files changed, 396 insertions(+), 289 deletions(-)

diff --git a/composer.lock b/composer.lock
index f933c55868b9..4c656625aa57 100644
--- a/composer.lock
+++ b/composer.lock
@@ -568,16 +568,16 @@
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "5.0.0",
+            "version": "5.0.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "28b51e11237f25cdb0efaea8e45af26007831aa9"
+                "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/28b51e11237f25cdb0efaea8e45af26007831aa9",
-                "reference": "28b51e11237f25cdb0efaea8e45af26007831aa9",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/6c72627de1d66832e4270e36e56acdb0d1d8f282",
+                "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282",
                 "shasum": ""
             },
             "require": {
@@ -592,7 +592,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-ring": "5.0-dev"
+                    "dev-master": "5.0-dev"
                 }
             },
             "autoload": {
@@ -622,7 +622,7 @@
                 "rest",
                 "web service"
             ],
-            "time": "2014-10-13 03:05:51"
+            "time": "2014-11-04 07:09:15"
         },
         {
             "name": "guzzlehttp/ringphp",
diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json
index db7fa29b30ce..21d4cd5703c1 100644
--- a/core/vendor/composer/installed.json
+++ b/core/vendor/composer/installed.json
@@ -2528,66 +2528,6 @@
             }
         ]
     },
-    {
-        "name": "guzzlehttp/guzzle",
-        "version": "5.0.0",
-        "version_normalized": "5.0.0.0",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/guzzle/guzzle.git",
-            "reference": "28b51e11237f25cdb0efaea8e45af26007831aa9"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://api.github.com/repos/guzzle/guzzle/zipball/28b51e11237f25cdb0efaea8e45af26007831aa9",
-            "reference": "28b51e11237f25cdb0efaea8e45af26007831aa9",
-            "shasum": ""
-        },
-        "require": {
-            "guzzlehttp/ringphp": "~1.0",
-            "php": ">=5.4.0"
-        },
-        "require-dev": {
-            "ext-curl": "*",
-            "phpunit/phpunit": "~4.0",
-            "psr/log": "~1.0"
-        },
-        "time": "2014-10-13 03:05:51",
-        "type": "library",
-        "extra": {
-            "branch-alias": {
-                "dev-ring": "5.0-dev"
-            }
-        },
-        "installation-source": "dist",
-        "autoload": {
-            "psr-4": {
-                "GuzzleHttp\\": "src/"
-            }
-        },
-        "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": "twig/twig",
         "version": "v1.16.2",
@@ -2646,5 +2586,65 @@
         "keywords": [
             "templating"
         ]
+    },
+    {
+        "name": "guzzlehttp/guzzle",
+        "version": "5.0.3",
+        "version_normalized": "5.0.3.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/guzzle/guzzle.git",
+            "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/guzzle/guzzle/zipball/6c72627de1d66832e4270e36e56acdb0d1d8f282",
+            "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282",
+            "shasum": ""
+        },
+        "require": {
+            "guzzlehttp/ringphp": "~1.0",
+            "php": ">=5.4.0"
+        },
+        "require-dev": {
+            "ext-curl": "*",
+            "phpunit/phpunit": "~4.0",
+            "psr/log": "~1.0"
+        },
+        "time": "2014-11-04 07:09:15",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "5.0-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "GuzzleHttp\\": "src/"
+            }
+        },
+        "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"
+        ]
     }
 ]
diff --git a/core/vendor/guzzlehttp/guzzle/CHANGELOG.md b/core/vendor/guzzlehttp/guzzle/CHANGELOG.md
index 63394fb7cc53..e997e10430db 100644
--- a/core/vendor/guzzlehttp/guzzle/CHANGELOG.md
+++ b/core/vendor/guzzlehttp/guzzle/CHANGELOG.md
@@ -1,8 +1,52 @@
-CHANGELOG
-=========
-
-5.0.0 (2014-10-12)
-------------------
+# CHANGELOG
+
+## 5.0.3 - 2014-11-03
+
+This change updates query strings so that they are treated as un-encoded values
+by default where the value represents an un-encoded value to send over the
+wire. A Query object then encodes the value before sending over the wire. This
+means that even value query string values (e.g., ":") are url encoded. This
+makes the Query class match PHP's http_build_query function. However, if you
+want to send requests over the wire using valid query string characters that do
+not need to be encoded, then you can provide a string to Url::setQuery() and
+pass true as the second argument to specify that the query string is a raw
+string that should not be parsed or encoded (unless a call to getQuery() is
+subsequently made, forcing the query-string to be converted into a Query
+object).
+
+## 5.0.2 - 2014-10-30
+
+* Added a trailing `\r\n` to multipart/form-data payloads. See
+  https://github.com/guzzle/guzzle/pull/871
+* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs.
+* Status codes are now returned as integers. See
+  https://github.com/guzzle/guzzle/issues/881
+* No longer overwriting an existing `application/x-www-form-urlencoded` header
+  when sending POST requests, allowing for customized headers. See
+  https://github.com/guzzle/guzzle/issues/877
+* Improved path URL serialization.
+
+  * No longer double percent-encoding characters in the path or query string if
+    they are already encoded.
+  * Now properly encoding the supplied path to a URL object, instead of only
+    encoding ' ' and '?'.
+  * Note: This has been changed in 5.0.3 to now encode query string values by
+    default unless the `rawString` argument is provided when setting the query
+    string on a URL: Now allowing many more characters to be present in the
+    query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A
+
+## 5.0.1 - 2014-10-16
+
+Bugfix release.
+
+* Fixed an issue where connection errors still returned response object in
+  error and end events event though the response is unusable. This has been
+  corrected so that a response is not returned in the `getResponse` method of
+  these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867
+* Fixed an issue where transfer statistics were not being populated in the
+  RingBridge. https://github.com/guzzle/guzzle/issues/866
+
+## 5.0.0 - 2014-10-12
 
 Adding support for non-blocking responses and some minor API cleanup.
 
@@ -83,21 +127,18 @@ interfaces.
       argument. They now accept an associative array of options, including the
       "size" key and "metadata" key which can be used to provide custom metadata.
 
-4.2.2 (2014-09-08)
-------------------
+## 4.2.2 - 2014-09-08
 
 * Fixed a memory leak in the CurlAdapter when reusing cURL handles.
 * No longer using `request_fulluri` in stream adapter proxies.
 * Relative redirects are now based on the last response, not the first response.
 
-4.2.1 (2014-08-19)
-------------------
+## 4.2.1 - 2014-08-19
 
 * Ensuring that the StreamAdapter does not always add a Content-Type header
 * Adding automated github releases with a phar and zip
 
-4.2.0 (2014-08-17)
-------------------
+## 4.2.0 - 2014-08-17
 
 * Now merging in default options using a case-insensitive comparison.
   Closes https://github.com/guzzle/guzzle/issues/767
@@ -116,8 +157,7 @@ interfaces.
 * No longer utilizing the now deprecated namespaced methods from the stream
   package.
 
-4.1.8 (2014-08-14)
-------------------
+## 4.1.8 - 2014-08-14
 
 * Fixed an issue in the CurlFactory that caused setting the `stream=false`
   request option to throw an exception.
@@ -128,8 +168,7 @@ interfaces.
   when creating POST requests to force multipart bodies.
   See https://github.com/guzzle/guzzle/issues/768
 
-4.1.7 (2014-08-07)
-------------------
+## 4.1.7 - 2014-08-07
 
 * Fixed an error in the HistoryPlugin that caused the same request and response
   to be logged multiple times when an HTTP protocol error occurs.
@@ -145,14 +184,12 @@ interfaces.
 * Fixed a bug where multipart/form-data POST fields were not correctly
   aggregated (e.g., values with "&").
 
-4.1.6 (2014-08-03)
-------------------
+## 4.1.6 - 2014-08-03
 
 * Added helper methods to make it easier to represent messages as strings,
   including getting the start line and getting headers as a string.
 
-4.1.5 (2014-08-02)
-------------------
+## 4.1.5 - 2014-08-02
 
 * Automatically retrying cURL "Connection died, retrying a fresh connect"
   errors when possible.
@@ -160,8 +197,7 @@ interfaces.
 * Allowing multiple event subscriber listeners to be registered per event by
   passing an array of arrays of listener configuration.
 
-4.1.4 (2014-07-22)
-------------------
+## 4.1.4 - 2014-07-22
 
 * Fixed a bug that caused multi-part POST requests with more than one field to
   serialize incorrectly.
@@ -171,8 +207,7 @@ interfaces.
 * A `save_to` stream is now created lazily, which means that files are not
   created on disk unless a request succeeds.
 
-4.1.3 (2014-07-15)
-------------------
+## 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
@@ -185,21 +220,18 @@ interfaces.
 * Fixing an issue where multi-valued headers were not being utilized correctly
   in the StreamAdapter
 
-4.1.2 (2014-06-18)
-------------------
+## 4.1.2 - 2014-06-18
 
 * Added support for sending payloads with GET requests
 
-4.1.1 (2014-06-08)
-------------------
+## 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)
-------------------
+## 4.1.0 - 2014-05-27
 
 * Added a `json` request option to easily serialize JSON payloads.
 * Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON.
@@ -218,8 +250,7 @@ interfaces.
 * Proxy requests using the StreamAdapter now properly use request_fulluri (#632)
 * Added the ability to set scalars as POST fields (#628)
 
-4.0.1 (2014-04-04)
-------------------
+## 4.0.1 - 2014-04-04
 
 * The HTTP status code of a response is now set as the exception code of
   RequestException objects.
@@ -228,8 +259,7 @@ interfaces.
 * HasDataTrait now initializes the internal data array as an empty array so
   that the toArray() method always returns an array.
 
-4.0.0 (2014-03-29)
-------------------
+## 4.0.0 - 2014-03-29
 
 * For more information on the 4.0 transition, see:
   http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/
@@ -241,8 +271,7 @@ interfaces.
   You can now pass a callable or an array of associative arrays where each
   associative array contains the "fn", "priority", and "once" keys.
 
-4.0.0.rc-2 (2014-03-25)
------------------------
+## 4.0.0.rc-2 - 2014-03-25
 
 * Removed `getConfig()` and `setConfig()` from clients to avoid confusion
   around whether things like base_url, message_factory, etc. should be able to
@@ -266,13 +295,11 @@ interfaces.
 * Marked deprecation_proxy() as internal
 * Test server is now a collection of static methods on a class
 
-4.0.0-rc.1 (2014-03-15)
------------------------
+## 4.0.0-rc.1 - 2014-03-15
 
 * See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40
 
-3.8.1 (2014-01-28)
-------------------
+## 3.8.1 - 2014-01-28
 
 * Bug: Always using GET requests when redirecting from a 303 response
 * Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in
@@ -290,8 +317,7 @@ interfaces.
 * Now properly escaping the regular expression delimiter when matching Cookie domains.
 * Network access is now disabled when loading XML documents
 
-3.8.0 (2013-12-05)
-------------------
+## 3.8.0 - 2013-12-05
 
 * Added the ability to define a POST name for a file
 * JSON response parsing now properly walks additionalProperties
@@ -311,8 +337,7 @@ interfaces.
 * Various fixes to the AsyncPlugin
 * Cleaned up build scripts
 
-3.7.4 (2013-10-02)
-------------------
+## 3.7.4 - 2013-10-02
 
 * Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430)
 * Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp
@@ -322,8 +347,7 @@ interfaces.
 * Updated the bundled cacert.pem (#419)
 * OauthPlugin now supports adding authentication to headers or query string (#425)
 
-3.7.3 (2013-09-08)
-------------------
+## 3.7.3 - 2013-09-08
 
 * Added the ability to get the exception associated with a request/command when using `MultiTransferException` and
   `CommandTransferException`.
@@ -339,8 +363,7 @@ interfaces.
 * Bug fix: Properly parsing headers that contain commas contained in quotes
 * Bug fix: mimetype guessing based on a filename is now case-insensitive
 
-3.7.2 (2013-08-02)
-------------------
+## 3.7.2 - 2013-08-02
 
 * Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander
   See https://github.com/guzzle/guzzle/issues/371
@@ -355,8 +378,7 @@ interfaces.
   https://github.com/guzzle/guzzle/pull/380
 * cURL multi cleanup and optimizations
 
-3.7.1 (2013-07-05)
-------------------
+## 3.7.1 - 2013-07-05
 
 * Bug fix: Setting default options on a client now works
 * Bug fix: Setting options on HEAD requests now works. See #352
@@ -371,8 +393,7 @@ interfaces.
 * Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails
 * Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin
 
-3.7.0 (2013-06-10)
-------------------
+## 3.7.0 - 2013-06-10
 
 * See UPGRADING.md for more information on how to upgrade.
 * Requests now support the ability to specify an array of $options when creating a request to more easily modify a
@@ -456,8 +477,7 @@ interfaces.
   CanCacheStrategyInterface $canCache = null)`
 * Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)`
 
-3.6.0 (2013-05-29)
-------------------
+## 3.6.0 - 2013-05-29
 
 * ServiceDescription now implements ToArrayInterface
 * Added command.hidden_params to blacklist certain headers from being treated as additionalParameters
@@ -494,8 +514,7 @@ interfaces.
 * `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess
 * Added the ability to cast Model objects to a string to view debug information.
 
-3.5.0 (2013-05-13)
-------------------
+## 3.5.0 - 2013-05-13
 
 * Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times
 * Bug: Better cleanup of one-time events accross the board (when an event is meant to fire once, it will now remove
@@ -517,14 +536,12 @@ interfaces.
   and responses that are sent over the wire
 * Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects
 
-3.4.3 (2013-04-30)
-------------------
+## 3.4.3 - 2013-04-30
 
 * Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response
 * Added a check to re-extract the temp cacert bundle from the phar before sending each request
 
-3.4.2 (2013-04-29)
-------------------
+## 3.4.2 - 2013-04-29
 
 * Bug fix: Stream objects now work correctly with "a" and "a+" modes
 * Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present
@@ -539,8 +556,7 @@ interfaces.
 * Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send)
 * Configuration loading now allows remote files
 
-3.4.1 (2013-04-16)
-------------------
+## 3.4.1 - 2013-04-16
 
 * Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti
   handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost.
@@ -553,8 +569,7 @@ interfaces.
 * Added support for oauth_verifier in OAuth signatures
 * Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection
 
-3.4.0 (2013-04-11)
-------------------
+## 3.4.0 - 2013-04-11
 
 * Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289
 * Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289
@@ -584,8 +599,7 @@ interfaces.
   POST fields or files (the latter is only used when emulating a form POST in the browser).
 * Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest
 
-3.3.1 (2013-03-10)
-------------------
+## 3.3.1 - 2013-03-10
 
 * Added the ability to create PHP streaming responses from HTTP requests
 * Bug fix: Running any filters when parsing response headers with service descriptions
@@ -596,8 +610,7 @@ interfaces.
 * RequestFactory::create() now uses the key of a POST file when setting the POST file name
 * Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set
 
-3.3.0 (2013-03-03)
-------------------
+## 3.3.0 - 2013-03-03
 
 * A large number of performance optimizations have been made
 * Bug fix: Added 'wb' as a valid write mode for streams
@@ -621,8 +634,7 @@ interfaces.
     * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error
     * Debug headers can now added to cached response in the CachePlugin
 
-3.2.0 (2013-02-14)
-------------------
+## 3.2.0 - 2013-02-14
 
 * CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients.
 * URLs with no path no longer contain a "/" by default
@@ -641,8 +653,7 @@ interfaces.
 * Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded
 * Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives
 
-3.1.2 (2013-01-27)
-------------------
+## 3.1.2 - 2013-01-27
 
 * Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the
   response body. For example, the XmlVisitor now parses the XML response into an array in the before() method.
@@ -651,15 +662,13 @@ interfaces.
 * Fixed a bug where redirect responses were not chained correctly using getPreviousResponse()
 * Setting default headers on a client after setting the user-agent will not erase the user-agent setting
 
-3.1.1 (2013-01-20)
-------------------
+## 3.1.1 - 2013-01-20
 
 * Adding wildcard support to Guzzle\Common\Collection::getPath()
 * Adding alias support to ServiceBuilder configs
 * Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface
 
-3.1.0 (2013-01-12)
-------------------
+## 3.1.0 - 2013-01-12
 
 * BC: CurlException now extends from RequestException rather than BadResponseException
 * BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse()
@@ -676,23 +685,20 @@ interfaces.
 * Added `extends` attributes to service description parameters
 * Added getModels to ServiceDescriptionInterface
 
-3.0.7 (2012-12-19)
-------------------
+## 3.0.7 - 2012-12-19
 
 * Fixing phar detection when forcing a cacert to system if null or true
 * Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()`
 * Cleaning up `Guzzle\Common\Collection::inject` method
 * Adding a response_body location to service descriptions
 
-3.0.6 (2012-12-09)
-------------------
+## 3.0.6 - 2012-12-09
 
 * CurlMulti performance improvements
 * Adding setErrorResponses() to Operation
 * composer.json tweaks
 
-3.0.5 (2012-11-18)
-------------------
+## 3.0.5 - 2012-11-18
 
 * Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin
 * Bug: Response body can now be a string containing "0"
@@ -702,8 +708,7 @@ interfaces.
 * DefaultRequestSerializer now supports array URI parameter values for URI template expansion
 * Added better mimetype guessing to requests and post files
 
-3.0.4 (2012-11-11)
-------------------
+## 3.0.4 - 2012-11-11
 
 * Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value
 * Bug: Cookies can now be added that have a name, domain, or value set to "0"
@@ -714,8 +719,7 @@ interfaces.
 * Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies
 * Added the ability to create any sort of hash for a stream rather than just an MD5 hash
 
-3.0.3 (2012-11-04)
-------------------
+## 3.0.3 - 2012-11-04
 
 * Implementing redirects in PHP rather than cURL
 * Added PECL URI template extension and using as default parser if available
@@ -724,23 +728,20 @@ interfaces.
 * Adding ToArrayInterface throughout library
 * Fixing OauthPlugin to create unique nonce values per request
 
-3.0.2 (2012-10-25)
-------------------
+## 3.0.2 - 2012-10-25
 
 * Magic methods are enabled by default on clients
 * Magic methods return the result of a command
 * Service clients no longer require a base_url option in the factory
 * Bug: Fixed an issue with URI templates where null template variables were being expanded
 
-3.0.1 (2012-10-22)
-------------------
+## 3.0.1 - 2012-10-22
 
 * Models can now be used like regular collection objects by calling filter, map, etc.
 * Models no longer require a Parameter structure or initial data in the constructor
 * Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator`
 
-3.0.0 (2012-10-15)
-------------------
+## 3.0.0 - 2012-10-15
 
 * Rewrote service description format to be based on Swagger
     * Now based on JSON schema
@@ -772,13 +773,11 @@ interfaces.
 * Cleaning up Collection class and removing default values from the get method
 * Fixed ZF2 cache adapters
 
-2.8.8 (2012-10-15)
-------------------
+## 2.8.8 - 2012-10-15
 
 * Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did
 
-2.8.7 (2012-09-30)
-------------------
+## 2.8.7 - 2012-09-30
 
 * Bug: Fixed config file aliases for JSON includes
 * Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests
@@ -792,8 +791,7 @@ interfaces.
 * Added the ability to remove POST fields from OAuth signatures
 * OAuth plugin now supports 2-legged OAuth
 
-2.8.6 (2012-09-05)
-------------------
+## 2.8.6 - 2012-09-05
 
 * Added the ability to modify and build service descriptions
 * Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command
@@ -807,8 +805,7 @@ interfaces.
 * The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like
   '_default' with a default JSON configuration file.
 
-2.8.5 (2012-08-29)
-------------------
+## 2.8.5 - 2012-08-29
 
 * Bug: Suppressed empty arrays from URI templates
 * Bug: Added the missing $options argument from ServiceDescription::factory to enable caching
@@ -816,8 +813,7 @@ interfaces.
 * AbstractCommand commands are now invokable
 * Added a way to get the data used when signing an Oauth request before a request is sent
 
-2.8.4 (2012-08-15)
-------------------
+## 2.8.4 - 2012-08-15
 
 * Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin
 * Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable.
@@ -831,8 +827,7 @@ interfaces.
 * Added the ability of the MockPlugin to consume mocked request bodies
 * LogPlugin now exposes request and response objects in the extras array
 
-2.8.3 (2012-07-30)
-------------------
+## 2.8.3 - 2012-07-30
 
 * Bug: Fixed a case where empty POST requests were sent as GET requests
 * Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body
@@ -842,8 +837,7 @@ interfaces.
 * Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything
 * Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles
 
-2.8.2 (2012-07-24)
-------------------
+## 2.8.2 - 2012-07-24
 
 * Bug: Query string values set to 0 are no longer dropped from the query string
 * Bug: A Collection object is no longer created each time a call is made to ``Guzzle\Service\Command\AbstractCommand::getRequestHeaders()``
@@ -851,14 +845,12 @@ interfaces.
 * QueryString and Collection performance improvements
 * Allowing dot notation for class paths in filters attribute of a service descriptions
 
-2.8.1 (2012-07-16)
-------------------
+## 2.8.1 - 2012-07-16
 
 * Loosening Event Dispatcher dependency
 * POST redirects can now be customized using CURLOPT_POSTREDIR
 
-2.8.0 (2012-07-15)
-------------------
+## 2.8.0 - 2012-07-15
 
 * BC: Guzzle\Http\Query
     * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl)
@@ -871,8 +863,7 @@ interfaces.
 * Cookies are no longer URL decoded by default
 * Bug: URI template variables set to null are no longer expanded
 
-2.7.2 (2012-07-02)
-------------------
+## 2.7.2 - 2012-07-02
 
 * BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser.
 * BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty()
@@ -882,14 +873,12 @@ interfaces.
 * Allowing deeply nested arrays for composite variables in URI templates
 * Batch divisors can now return iterators or arrays
 
-2.7.1 (2012-06-26)
-------------------
+## 2.7.1 - 2012-06-26
 
 * Minor patch to update version number in UA string
 * Updating build process
 
-2.7.0 (2012-06-25)
-------------------
+## 2.7.0 - 2012-06-25
 
 * BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes.
 * BC: Removed magic setX methods from commands
@@ -906,8 +895,7 @@ interfaces.
 * Fixed some tests so that they pass more reliably
 * Added Guzzle\Common\Log\ArrayLogAdapter
 
-2.6.6 (2012-06-10)
-------------------
+## 2.6.6 - 2012-06-10
 
 * BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin
 * BC: Removing Guzzle\Service\Command\CommandSet
@@ -917,8 +905,7 @@ interfaces.
 * Adding result_type, result_doc, deprecated, and doc_url to service descriptions
 * Bug: Changed the default cookie header casing back to 'Cookie'
 
-2.6.5 (2012-06-03)
-------------------
+## 2.6.5 - 2012-06-03
 
 * BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource()
 * BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from
@@ -930,8 +917,7 @@ interfaces.
 * Adding getCookies() to request interface.
 * Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber()
 
-2.6.4 (2012-05-30)
-------------------
+## 2.6.4 - 2012-05-30
 
 * BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class.
 * BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand
@@ -948,8 +934,7 @@ interfaces.
 * Allowing the result of a command object to be changed
 * Parsing location and type sub values when instantiating a service description rather than over and over at runtime
 
-2.6.3 (2012-05-23)
-------------------
+## 2.6.3 - 2012-05-23
 
 * [BC] Guzzle\Common\FromConfigInterface no longer requires any config options.
 * [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields.
@@ -963,13 +948,11 @@ interfaces.
 * Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate.
 * CS updates
 
-2.6.2 (2012-05-19)
-------------------
+## 2.6.2 - 2012-05-19
 
 * [Http] Better handling of nested scope requests in CurlMulti.  Requests are now always prepares in the send() method rather than the addRequest() method.
 
-2.6.1 (2012-05-19)
-------------------
+## 2.6.1 - 2012-05-19
 
 * [BC] Removing 'path' support in service descriptions.  Use 'uri'.
 * [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache.
@@ -980,8 +963,7 @@ interfaces.
 * Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored.
 * Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible.
 
-2.6.0 (2012-05-15)
-------------------
+## 2.6.0 - 2012-05-15
 
 * [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder
 * [BC] Executing a Command returns the result of the command rather than the command
@@ -1009,8 +991,7 @@ interfaces.
 * Adding the ability to include other service builder config files from within XML and JSON files
 * Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method.
 
-2.5.0 (2012-05-08)
-------------------
+## 2.5.0 - 2012-05-08
 
 * Major performance improvements
 * [BC] Simplifying Guzzle\Common\Collection.  Please check to see if you are using features that are now deprecated.
diff --git a/core/vendor/guzzlehttp/guzzle/Makefile b/core/vendor/guzzlehttp/guzzle/Makefile
index b8188d22b88a..69bf3273e82c 100644
--- a/core/vendor/guzzlehttp/guzzle/Makefile
+++ b/core/vendor/guzzlehttp/guzzle/Makefile
@@ -29,7 +29,7 @@ view-docs:
 tag:
 	$(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=4.2.1"))
 	@echo Tagging $(TAG)
-	chag update -m '$(TAG) ()'
+	chag update $(TAG)
 	sed -i '' -e "s/VERSION = '.*'/VERSION = '$(TAG)'/" src/ClientInterface.php
 	php -l src/ClientInterface.php
 	git add -A
@@ -45,6 +45,6 @@ package: burgomaster
 
 burgomaster:
 	mkdir -p build/artifacts
-	curl -s https://raw.githubusercontent.com/mtdowling/Burgomaster/0.0.1/src/Burgomaster.php > build/artifacts/Burgomaster.php
+	curl -s https://raw.githubusercontent.com/mtdowling/Burgomaster/0.0.2/src/Burgomaster.php > build/artifacts/Burgomaster.php
 
 .PHONY: docs burgomaster
diff --git a/core/vendor/guzzlehttp/guzzle/README.md b/core/vendor/guzzlehttp/guzzle/README.md
index 90e163b541cc..9df698115a8e 100644
--- a/core/vendor/guzzlehttp/guzzle/README.md
+++ b/core/vendor/guzzlehttp/guzzle/README.md
@@ -52,14 +52,10 @@ The recommended way to install Guzzle is through
 curl -sS https://getcomposer.org/installer | php
 ```
 
-Next, update your project's composer.json file to include Guzzle:
+Next, run the Composer command to install the latest stable version of Guzzle:
 
-```javascript
-{
-    "require": {
-        "guzzlehttp/guzzle": "~5.0"
-    }
-}
+```bash
+composer require guzzlehttp/guzzle
 ```
 
 After installing, you need to require Composer's autoloader:
diff --git a/core/vendor/guzzlehttp/guzzle/composer.json b/core/vendor/guzzlehttp/guzzle/composer.json
index 43804ffbb3e6..e9615a01ebd7 100644
--- a/core/vendor/guzzlehttp/guzzle/composer.json
+++ b/core/vendor/guzzlehttp/guzzle/composer.json
@@ -33,7 +33,7 @@
     },
     "extra": {
         "branch-alias": {
-            "dev-ring": "5.0-dev"
+            "dev-master": "5.0-dev"
         }
     }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/docs/events.rst b/core/vendor/guzzlehttp/guzzle/docs/events.rst
index fc849075a8fc..4dae96b96cec 100644
--- a/core/vendor/guzzlehttp/guzzle/docs/events.rst
+++ b/core/vendor/guzzlehttp/guzzle/docs/events.rst
@@ -202,12 +202,12 @@ priority of the listener (as shown in the ``before`` listener in the example).
             ];
         }
 
-        public function onBefore(BeforeEvent $event, $name, EmitterInterface $emitter)
+        public function onBefore(BeforeEvent $event, $name)
         {
             echo 'Before!';
         }
 
-        public function onComplete(CompleteEvent $event, $name, EmitterInterface $emitter)
+        public function onComplete(CompleteEvent $event, $name)
         {
             echo 'Complete!';
         }
diff --git a/core/vendor/guzzlehttp/guzzle/docs/faq.rst b/core/vendor/guzzlehttp/guzzle/docs/faq.rst
index 0647f693a71e..8457c7edaff7 100644
--- a/core/vendor/guzzlehttp/guzzle/docs/faq.rst
+++ b/core/vendor/guzzlehttp/guzzle/docs/faq.rst
@@ -97,7 +97,7 @@ exception.
 
 .. code-block:: php
 
-    $request = $client->createRequest('GET', ['future' => true']);
+    $request = $client->createRequest('GET', ['future' => true]);
     $client->send($request)->then(function ($response) {
         echo 'Got a response! ' . $response;
     });
@@ -107,7 +107,7 @@ of a response.
 
 .. code-block:: php
 
-    $request = $client->createRequest('GET', ['future' => true']);
+    $request = $client->createRequest('GET', ['future' => true]);
     $futureResponse = $client->send($request);
     $futureResponse->wait();
 
diff --git a/core/vendor/guzzlehttp/guzzle/docs/handlers.rst b/core/vendor/guzzlehttp/guzzle/docs/handlers.rst
index af0b9232e757..d452003fd859 100644
--- a/core/vendor/guzzlehttp/guzzle/docs/handlers.rst
+++ b/core/vendor/guzzlehttp/guzzle/docs/handlers.rst
@@ -38,6 +38,6 @@ up to the RingPHP project using a very simple bridge class
 Creating a handler
 ------------------
 
-See the `RingPHP <http://guzzle-ring.readthedocs.org>`_ project
+See the `RingPHP <http://ringphp.readthedocs.org>`_ project
 documentation for more information on creating custom handlers that can be
 used with Guzzle clients.
diff --git a/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php
index d750e02cf9c1..4f6ad26c7c03 100644
--- a/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php
+++ b/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php
@@ -11,7 +11,7 @@
  */
 interface ClientInterface extends HasEmitterInterface
 {
-    const VERSION = '5.0.0';
+    const VERSION = '5.0.3';
 
     /**
      * Create and return a new {@see RequestInterface} object.
diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
index b6c79661689e..9e4a90f59b92 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
@@ -2,6 +2,7 @@
 namespace GuzzleHttp\Event;
 
 use GuzzleHttp\Message\ResponseInterface;
+use GuzzleHttp\Ring\Future\FutureInterface;
 
 /**
  * Event that contains transfer statistics, and can be intercepted.
@@ -27,13 +28,23 @@ public function getTransferInfo($name = null)
     }
 
     /**
-     * Get the response
+     * Returns true/false if a response is available.
+     *
+     * @return bool
+     */
+    public function hasResponse()
+    {
+        return !($this->transaction->response instanceof FutureInterface);
+    }
+
+    /**
+     * Get the response.
      *
      * @return ResponseInterface|null
      */
     public function getResponse()
     {
-        return $this->transaction->response;
+        return $this->hasResponse() ? $this->transaction->response : null;
     }
 
     /**
diff --git a/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php b/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
index 293e217a8ec6..f81d2483638f 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php
@@ -70,7 +70,7 @@ public static function create(
             return new self('Error completing request', $request, null, $previous);
         }
 
-        $level = $response->getStatusCode()[0];
+        $level = floor($response->getStatusCode() / 100);
         if ($level == '4') {
             $label = 'Client error response';
             $className = __NAMESPACE__ . '\\ClientException';
diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/Response.php b/core/vendor/guzzlehttp/guzzle/src/Message/Response.php
index 1a7319d31ec7..42e10e64e28a 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Message/Response.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Message/Response.php
@@ -83,7 +83,7 @@ class Response extends AbstractMessage implements ResponseInterface
     private $effectiveUrl;
 
     /**
-     * @param string          $statusCode The response status code (e.g. 200)
+     * @param int|string      $statusCode The response status code (e.g. 200)
      * @param array           $headers    The response headers
      * @param StreamInterface $body       The body of the response
      * @param array           $options    Response message options
@@ -96,7 +96,7 @@ public function __construct(
         StreamInterface $body = null,
         array $options = []
     ) {
-        $this->statusCode = (string) $statusCode;
+        $this->statusCode = (int) $statusCode;
         $this->handleOptions($options);
 
         // Assume a reason phrase if one was not applied as an option
@@ -122,7 +122,7 @@ public function getStatusCode()
 
     public function setStatusCode($code)
     {
-        return $this->statusCode = $code;
+        return $this->statusCode = (int) $code;
     }
 
     public function getReasonPhrase()
diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php b/core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php
index d673655e9329..c0ae9be93b61 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php
@@ -12,14 +12,14 @@ interface ResponseInterface extends MessageInterface
      * The Status-Code is a 3-digit integer result code of the server's attempt
      * to understand and satisfy the request.
      *
-     * @return integer Status code.
+     * @return int Status code.
      */
     public function getStatusCode();
 
     /**
      * Sets the status code of this response.
      *
-     * @param integer $code The 3-digit integer result code to set.
+     * @param int $code The 3-digit integer result code to set.
      */
     public function setStatusCode($code);
 
diff --git a/core/vendor/guzzlehttp/guzzle/src/Pool.php b/core/vendor/guzzlehttp/guzzle/src/Pool.php
index d1f4607f198b..e95ab096b8b6 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Pool.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Pool.php
@@ -127,6 +127,22 @@ public static function batch(
         return new BatchResults($hash);
     }
 
+    /**
+     * Creates a Pool and immediately sends the requests.
+     *
+     * @param ClientInterface $client   Client used to send the requests
+     * @param array|\Iterator $requests Requests to send in parallel
+     * @param array           $options  Passes through the options available in
+     *                                  {@see GuzzleHttp\Pool::__construct}
+     */
+    public static function send(
+        ClientInterface $client,
+        $requests,
+        array $options = []
+    ) {
+        (new self($client, $requests, $options))->wait();
+    }
+
     public function wait()
     {
         if ($this->isRealized) {
diff --git a/core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php b/core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php
index d6bc46b380b9..1149e6235440 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Post/MultipartBody.php
@@ -101,8 +101,8 @@ protected function createStream(array $fields, array $files)
             $stream->addStream(Stream::factory("\r\n"));
         }
 
-        // Add the trailing boundary
-        $stream->addStream(Stream::factory("--{$this->boundary}--"));
+        // Add the trailing boundary with CRLF
+        $stream->addStream(Stream::factory("--{$this->boundary}--\r\n"));
 
         return $stream;
     }
diff --git a/core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php b/core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php
index 649350c497d5..ed14d1f7037f 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Post/PostBody.php
@@ -38,8 +38,11 @@ public function applyRequestHeaders(RequestInterface $request)
                 'Content-Type',
                 'multipart/form-data; boundary=' . $this->getBody()->getBoundary()
             );
-        } elseif ($this->fields) {
-            $request->setHeader('Content-Type', 'application/x-www-form-urlencoded');
+        } elseif ($this->fields && !$request->hasHeader('Content-Type')) {
+            $request->setHeader(
+                'Content-Type',
+                'application/x-www-form-urlencoded'
+            );
         }
 
         if ($size = $this->getSize()) {
diff --git a/core/vendor/guzzlehttp/guzzle/src/Query.php b/core/vendor/guzzlehttp/guzzle/src/Query.php
index 862c0e5d421c..d053def6e93f 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Query.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Query.php
@@ -9,9 +9,8 @@ class Query extends Collection
     const RFC3986 = 'RFC3986';
     const RFC1738 = 'RFC1738';
 
-    /** @var bool URL encode fields and values */
-    private $encoding = self::RFC3986;
-
+    /** @var callable Encoding function */
+    private $encoding = 'rawurlencode';
     /** @var callable */
     private $aggregator;
 
@@ -75,27 +74,16 @@ public function __toString()
 
         $result = '';
         $aggregator = $this->aggregator;
+        $encoder = $this->encoding;
 
         foreach ($aggregator($this->data) as $key => $values) {
             foreach ($values as $value) {
                 if ($result) {
                     $result .= '&';
                 }
-                if ($this->encoding == self::RFC1738) {
-                    $result .= urlencode($key);
-                    if ($value !== null) {
-                        $result .= '=' . urlencode($value);
-                    }
-                } elseif ($this->encoding == self::RFC3986) {
-                    $result .= rawurlencode($key);
-                    if ($value !== null) {
-                        $result .= '=' . rawurlencode($value);
-                    }
-                } else {
-                    $result .= $key;
-                    if ($value !== null) {
-                        $result .= '=' . $value;
-                    }
+                $result .= $encoder($key);
+                if ($value !== null) {
+                    $result .= '=' . $encoder($value);
                 }
             }
         }
@@ -129,10 +117,18 @@ public function setAggregator(callable $aggregator)
      */
     public function setEncodingType($type)
     {
-        if ($type === false || $type === self::RFC1738 || $type === self::RFC3986) {
-            $this->encoding = $type;
-        } else {
-            throw new \InvalidArgumentException('Invalid URL encoding type');
+        switch ($type) {
+            case self::RFC3986:
+                $this->encoding = 'rawurlencode';
+                break;
+            case self::RFC1738:
+                $this->encoding = 'urlencode';
+                break;
+            case false:
+                $this->encoding = function ($v) { return $v; };
+                break;
+            default:
+                throw new \InvalidArgumentException('Invalid URL encoding type');
         }
     }
 
diff --git a/core/vendor/guzzlehttp/guzzle/src/RingBridge.php b/core/vendor/guzzlehttp/guzzle/src/RingBridge.php
index 88af9cefa4d4..12e3c70132c3 100644
--- a/core/vendor/guzzlehttp/guzzle/src/RingBridge.php
+++ b/core/vendor/guzzlehttp/guzzle/src/RingBridge.php
@@ -87,8 +87,8 @@ public static function completeRingResponse(
         callable $fsm
     ) {
         $trans->state = 'complete';
-        $trans->transferInfo = isset($response['transfer_info'])
-            ? $response['transfer_info'] : [];
+        $trans->transferInfo = isset($response['transfer_stats'])
+            ? $response['transfer_stats'] : [];
 
         if (!empty($response['status'])) {
             $options = [];
diff --git a/core/vendor/guzzlehttp/guzzle/src/Url.php b/core/vendor/guzzlehttp/guzzle/src/Url.php
index 497234f35af0..95ec43335114 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Url.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Url.php
@@ -1,6 +1,8 @@
 <?php
 namespace GuzzleHttp;
 
+use GuzzleHttp\Ring\Core;
+
 /**
  * Parses and generates URLs based on URL parts
  */
@@ -14,8 +16,9 @@ class Url
     private $path = '';
     private $fragment;
     private static $defaultPorts = ['http' => 80, 'https' => 443, 'ftp' => 21];
-
-    /** @var Query Query part of the URL */
+    private static $pathPattern = '/[^a-zA-Z0-9\-\._~!\$&\'\(\)\*\+,;=%:@\/]+|%(?![A-Fa-f0-9]{2})/';
+    private static $queryPattern = '/[^a-zA-Z0-9\-\._~!\$\'\(\)\*\+,;%:@\/\?=&]+|%(?![A-Fa-f0-9]{2})/';
+    /** @var Query|string Query part of the URL */
     private $query;
 
     /**
@@ -28,9 +31,9 @@ class Url
      */
     public static function fromString($url)
     {
-        static $defaults = array('scheme' => null, 'host' => null,
+        static $defaults = ['scheme' => null, 'host' => null,
             'path' => null, 'port' => null, 'query' => null,
-            'user' => null, 'pass' => null, 'fragment' => null);
+            'user' => null, 'pass' => null, 'fragment' => null];
 
         if (false === ($parts = parse_url($url))) {
             throw new \InvalidArgumentException('Unable to parse malformed '
@@ -116,14 +119,14 @@ public static function buildUrl(array $parts)
     /**
      * Create a new URL from URL parts
      *
-     * @param string                   $scheme   Scheme of the URL
-     * @param string                   $host     Host of the URL
-     * @param string                   $username Username of the URL
-     * @param string                   $password Password of the URL
-     * @param int                      $port     Port of the URL
-     * @param string                   $path     Path of the URL
+     * @param string             $scheme   Scheme of the URL
+     * @param string             $host     Host of the URL
+     * @param string             $username Username of the URL
+     * @param string             $password Password of the URL
+     * @param int                $port     Port of the URL
+     * @param string             $path     Path of the URL
      * @param Query|array|string $query    Query string of the URL
-     * @param string                   $fragment Fragment of the URL
+     * @param string             $fragment Fragment of the URL
      */
     public function __construct(
         $scheme,
@@ -141,11 +144,11 @@ public function __construct(
         $this->username = $username;
         $this->password = $password;
         $this->fragment = $fragment;
-        if (!$query) {
-            $this->query = new Query();
-        } else {
+
+        if ($query) {
             $this->setQuery($query);
         }
+
         $this->setPath($path);
     }
 
@@ -154,7 +157,9 @@ public function __construct(
      */
     public function __clone()
     {
-        $this->query = clone $this->query;
+        if ($this->query instanceof Query) {
+            $this->query = clone $this->query;
+        }
     }
 
     /**
@@ -222,8 +227,9 @@ public function getHost()
     public function setScheme($scheme)
     {
         // Remove the default port if one is specified
-        if ($this->port && isset(self::$defaultPorts[$this->scheme]) &&
-            self::$defaultPorts[$this->scheme] == $this->port
+        if ($this->port
+            && isset(self::$defaultPorts[$this->scheme])
+            && self::$defaultPorts[$this->scheme] == $this->port
         ) {
             $this->port = null;
         }
@@ -271,15 +277,15 @@ public function getPort()
     }
 
     /**
-     * Set the path part of the URL
+     * Set the path part of the URL.
+     *
+     * The provided URL is URL encoded as necessary.
      *
      * @param string $path Path string to set
      */
     public function setPath($path)
     {
-        static $search  = [' ',   '?'];
-        static $replace = ['%20', '%3F'];
-        $this->path = str_replace($search, $replace, $path);
+        $this->path = self::encodePath($path);
     }
 
     /**
@@ -411,29 +417,52 @@ public function getUsername()
      */
     public function getQuery()
     {
+        // Convert the query string to a query object if not already done.
+        if (!$this->query instanceof Query) {
+            $this->query = $this->query === null
+                ? new Query()
+                : Query::fromString($this->query);
+        }
+
         return $this->query;
     }
 
     /**
-     * Set the query part of the URL
+     * Set the query part of the URL.
+     *
+     * You may provide a query string as a string and pass $rawString as true
+     * to provide a query string that is not parsed until a call to getQuery()
+     * is made. Setting a raw query string will still encode invalid characters
+     * in a query string.
      *
      * @param Query|string|array $query Query string value to set. Can
      *     be a string that will be parsed into a Query object, an array
      *     of key value pairs, or a Query object.
+     * @param bool $rawString Set to true when providing a raw query string.
      *
      * @throws \InvalidArgumentException
      */
-    public function setQuery($query)
+    public function setQuery($query, $rawString = false)
     {
         if ($query instanceof Query) {
             $this->query = $query;
         } elseif (is_string($query)) {
-            $this->query = Query::fromString($query);
+            if (!$rawString) {
+                $this->query = Query::fromString($query);
+            } else {
+                // Ensure the query does not have illegal characters.
+                $this->query = preg_replace_callback(
+                    self::$queryPattern,
+                    [__CLASS__, 'encodeMatch'],
+                    $query
+                );
+            }
+
         } elseif (is_array($query)) {
             $this->query = new Query($query);
         } else {
             throw new \InvalidArgumentException('Query must be a Query, '
-                . 'array, or string. ' . gettype($query) . ' provided.');
+                . 'array, or string. Got ' . Core::describeType($query));
         }
     }
 
@@ -491,16 +520,7 @@ public function combine($url)
 
         // Passing a URL with a scheme overrides everything
         if ($parts['scheme']) {
-            return new static(
-                $parts['scheme'],
-                $parts['host'],
-                $parts['user'],
-                $parts['pass'],
-                $parts['port'],
-                $parts['path'],
-                clone $parts['query'],
-                $parts['fragment']
-            );
+            return clone $url;
         }
 
         // Setting a host overrides the entire rest of the URL
@@ -512,7 +532,9 @@ public function combine($url)
                 $parts['pass'],
                 $parts['port'],
                 $parts['path'],
-                clone $parts['query'],
+                $parts['query'] instanceof Query
+                    ? clone $parts['query']
+                    : $parts['query'],
                 $parts['fragment']
             );
         }
@@ -520,7 +542,7 @@ public function combine($url)
         if (!$parts['path'] && $parts['path'] !== '0') {
             // The relative URL has no path, so check if it is just a query
             $path = $this->path ?: '';
-            $query = count($parts['query']) ? $parts['query'] : $this->query;
+            $query = $parts['query'] ?: $this->query;
         } else {
             $query = $parts['query'];
             if ($parts['path'][0] == '/' || !$this->path) {
@@ -541,7 +563,7 @@ public function combine($url)
             $this->password,
             $this->port,
             $path,
-            clone $query,
+            $query instanceof Query ? clone $query : $query,
             $parts['fragment']
         );
 
@@ -551,4 +573,23 @@ public function combine($url)
 
         return $result;
     }
+
+    /**
+     * Encodes the path part of a URL without double-encoding percent-encoded
+     * key value pairs.
+     *
+     * @param string $path Path to encode
+     *
+     * @return string
+     */
+    public static function encodePath($path)
+    {
+        static $cb = [__CLASS__, 'encodeMatch'];
+        return preg_replace_callback(self::$pathPattern, $cb, $path);
+    }
+
+    private static function encodeMatch(array $match)
+    {
+        return rawurlencode($match[0]);
+    }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php
index 6f2deba30206..ca3b5ba9a08c 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php
@@ -30,6 +30,7 @@ public function testHasResponse()
         $e = $this->getMockBuilder('GuzzleHttp\Event\AbstractTransferEvent')
             ->setConstructorArgs([$t])
             ->getMockForAbstractClass();
+        $this->assertTrue($e->hasResponse());
         $this->assertSame($t->response, $e->getResponse());
     }
 
diff --git a/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php b/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php
index ee83e5de05ae..3e1fd3dc9caa 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php
@@ -555,7 +555,7 @@ public function testCanForceMultipartUploadWithContentType()
         $client->getEmitter()->attach($history);
         $client->post('http://foo.com', [
             'headers' => ['Content-Type' => 'multipart/form-data'],
-            'body' => ['foo' => 'bar']
+            'body'    => ['foo' => 'bar']
         ]);
         $this->assertContains(
             'multipart/form-data; boundary=',
diff --git a/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php b/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php
index b5c2e076d71d..788a0f875575 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php
@@ -216,4 +216,16 @@ public function testDoesNotThrowInErrorEvent()
         $this->assertCount(1, $result);
         $this->assertInstanceOf('GuzzleHttp\Exception\ClientException', $result[0]);
     }
+
+    public function testHasSendMethod()
+    {
+        $client = new Client();
+        $responses = [new Response(404)];
+        $history = new History();
+        $client->getEmitter()->attach($history);
+        $client->getEmitter()->attach(new Mock($responses));
+        $requests = [$client->createRequest('GET', 'http://foo.com/baz')];
+        Pool::send($client, $requests);
+        $this->assertCount(1, $history);
+    }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php b/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php
index 1614ec0a0bd4..308f5e056db9 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php
@@ -239,4 +239,18 @@ public function testCannotAttach()
         $b = new PostBody();
         $b->attach('foo');
     }
+
+    public function testDoesNotOverwriteExistingHeaderForUrlencoded()
+    {
+        $m = new Request('POST', 'http://foo.com', [
+            'content-type' => 'application/x-www-form-urlencoded; charset=utf-8'
+        ]);
+        $b = new PostBody();
+        $b->setField('foo', 'bar');
+        $b->applyRequestHeaders($m);
+        $this->assertEquals(
+            'application/x-www-form-urlencoded; charset=utf-8',
+            $m->getHeader('Content-Type')
+        );
+    }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/tests/QueryTest.php b/core/vendor/guzzlehttp/guzzle/tests/QueryTest.php
index 3d2fcbb54f2a..8b9d3448f72b 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/QueryTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/QueryTest.php
@@ -155,4 +155,17 @@ public function testCanChangeUrlEncodingDecodingToRfc3986()
         $this->assertEquals('bar baz', $q['foo']);
         $this->assertEquals('foo=bar%20baz', (string) $q);
     }
+
+    public function testQueryStringsAllowSlashButDoesNotDecodeWhenDisable()
+    {
+        $q = Query::fromString('foo=bar%2Fbaz&bam=boo%20boo', Query::RFC3986);
+        $q->setEncodingType(false);
+        $this->assertEquals('foo=bar/baz&bam=boo boo', (string) $q);
+    }
+
+    public function testQueryStringsAllowDecodingEncodingCompletelyDisabled()
+    {
+        $q = Query::fromString('foo=bar%2Fbaz&bam=boo boo!', false);
+        $this->assertEquals('foo=bar%2Fbaz&bam=boo boo!', (string) $q);
+    }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/tests/UrlTest.php b/core/vendor/guzzlehttp/guzzle/tests/UrlTest.php
index 4f06bd941006..efd374c1e033 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/UrlTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/UrlTest.php
@@ -245,7 +245,7 @@ public function testHasGettersAndSetters()
         $url->setScheme('https');
         $this->assertEquals('https', $url->getScheme());
         $url->setQuery('a=123');
-        $this->assertEquals('a=123', $url->getQuery());
+        $this->assertEquals('a=123', (string) $url->getQuery());
         $this->assertEquals(
             'https://b:a@example.com:8080/foo/bar?a=123#abc',
             (string) $url
@@ -256,6 +256,12 @@ public function testHasGettersAndSetters()
             'https://b:a@example.com:8080/foo/bar?b=boo#abc',
             (string) $url
         );
+
+        $url->setQuery('a%20=bar!', true);
+        $this->assertEquals(
+            'https://b:a@example.com:8080/foo/bar?a%20=bar!#abc',
+            (string) $url
+        );
     }
 
     public function testSetQueryAcceptsArray()
@@ -274,6 +280,17 @@ public function testQueryMustBeValid()
         $url->setQuery(false);
     }
 
+    public function testDefersParsingAndEncodingQueryUntilNecessary()
+    {
+        $url = Url::fromString('http://www.test.com');
+        // Note that invalid characters are encoded.
+        $url->setQuery('foo#bar/', true);
+        $this->assertEquals('http://www.test.com?foo%23bar/', (string) $url);
+        $this->assertInternalType('string', $this->readAttribute($url, 'query'));
+        $this->assertEquals('foo%23bar%2F', (string) $url->getQuery());
+        $this->assertInstanceOf('GuzzleHttp\Query', $this->readAttribute($url, 'query'));
+    }
+
     public function urlProvider()
     {
         return array(
@@ -330,4 +347,10 @@ public function testConvertsSpecialCharsInPathWhenCastingToString()
         $url->addPath('?');
         $this->assertEquals('http://foo.com/baz%20bar/%3F?a=b', (string) $url);
     }
+
+    public function testCorrectlyEncodesPathWithoutDoubleEncoding()
+    {
+        $url = Url::fromString('http://foo.com/baz%20 bar:boo/baz!');
+        $this->assertEquals('/baz%20%20bar:boo/baz!', $url->getPath());
+    }
 }
-- 
GitLab