diff --git a/core/composer.lock b/core/composer.lock
index 78822a0..26a3e21 100644
--- a/core/composer.lock
+++ b/core/composer.lock
@@ -783,16 +783,16 @@
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "5.2.0",
+            "version": "5.0.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "475b29ccd411f2fa8a408e64576418728c032cfa"
+                "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/475b29ccd411f2fa8a408e64576418728c032cfa",
-                "reference": "475b29ccd411f2fa8a408e64576418728c032cfa",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/6c72627de1d66832e4270e36e56acdb0d1d8f282",
+                "reference": "6c72627de1d66832e4270e36e56acdb0d1d8f282",
                 "shasum": ""
             },
             "require": {
@@ -837,20 +837,20 @@
                 "rest",
                 "web service"
             ],
-            "time": "2015-01-28 01:03:29"
+            "time": "2014-11-04 07:09:15"
         },
         {
             "name": "guzzlehttp/ringphp",
-            "version": "1.0.7",
+            "version": "1.0.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/RingPHP.git",
-                "reference": "52d868f13570a9a56e5fce6614e0ec75d0f13ac2"
+                "reference": "e7c28f96c5ac12ab0e63412cfc15989756fcb964"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/52d868f13570a9a56e5fce6614e0ec75d0f13ac2",
-                "reference": "52d868f13570a9a56e5fce6614e0ec75d0f13ac2",
+                "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/e7c28f96c5ac12ab0e63412cfc15989756fcb964",
+                "reference": "e7c28f96c5ac12ab0e63412cfc15989756fcb964",
                 "shasum": ""
             },
             "require": {
@@ -887,8 +887,7 @@
                     "homepage": "https://github.com/mtdowling"
                 }
             ],
-            "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.",
-            "time": "2015-03-30 01:43:20"
+            "time": "2014-11-04 07:01:14"
         },
         {
             "name": "guzzlehttp/streams",
diff --git a/core/lib/Drupal/Core/Database/Schema.php b/core/lib/Drupal/Core/Database/Schema.php
index cae71b8..42abe5b 100644
--- a/core/lib/Drupal/Core/Database/Schema.php
+++ b/core/lib/Drupal/Core/Database/Schema.php
@@ -554,7 +554,14 @@ public function fieldExists($table, $column) {
    * @param $name
    *   The name of the index.
    * @param $fields
-   *   An array of field names.
+   *   An array of field names or field information; if field information is
+   *   passed, it's an array whose first element is the field name and whose
+   *   second is the maximum length in the index. For example, the following
+   *   will use the full length of the `foo` field, but limit the `bar` field to
+   *   4 characters:
+   *   @code
+   *     $fields = ['foo', ['bar', 4]];
+   *   @endcode
    *
    * @throws \Drupal\Core\Database\SchemaObjectDoesNotExistException
    *   If the specified table doesn't exist.
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
index 40da4b8..c26b98b 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
@@ -585,7 +585,7 @@ public function onChange($name) {
       case $this->defaultLangcodeKey:
         // @todo Use a standard method to make the default_langcode field
         //   read-only. See https://www.drupal.org/node/2443991.
-        if (isset($this->values[$this->defaultLangcodeKey]) && $this->get($this->defaultLangcodeKey)->value != $this->isDefaultTranslation()) {
+        if (isset($this->values[$this->defaultLangcodeKey])) {
           $this->get($this->defaultLangcodeKey)->setValue($this->isDefaultTranslation(), FALSE);
           $message = SafeMarkup::format('The default translation flag cannot be changed (@langcode).', array('@langcode' => $this->activeLangcode));
           throw new \LogicException($message);
diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php
index 7de771a..40945c0 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php
+++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/PasswordItem.php
@@ -7,11 +7,6 @@
 
 namespace Drupal\Core\Field\Plugin\Field\FieldType;
 
-use Drupal\Core\Entity\EntityMalformedException;
-use Drupal\Core\Field\FieldStorageDefinitionInterface;
-use Drupal\Core\StringTranslation\TranslationWrapper;
-use Drupal\Core\TypedData\DataDefinition;
-
 /**
  * Defines the 'password' entity field type.
  *
@@ -22,45 +17,4 @@
  *   no_ui = TRUE,
  * )
  */
-class PasswordItem extends StringItem {
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) {
-    $properties['value'] = DataDefinition::create('string')
-      ->setLabel(new TranslationWrapper('The hashed password'))
-      ->setSetting('case_sensitive', TRUE);
-    $properties['existing'] = DataDefinition::create('string')
-      ->setLabel(new TranslationWrapper('Existing password'));
-
-    return $properties;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function preSave() {
-    parent::preSave();
-
-    $entity = $this->getEntity();
-
-    // Update the user password if it has changed.
-    if ($entity->isNew() || ($this->value && $this->value != $entity->original->{$this->getFieldDefinition()->getName()}->value)) {
-      // Allow alternate password hashing schemes.
-      $this->value = \Drupal::service('password')->hash(trim($this->value));
-      // Abort if the hashing failed and returned FALSE.
-      if (!$this->value) {
-        throw new EntityMalformedException('The entity does not have a password.');
-      }
-    }
-
-    if (!$entity->isNew()) {
-      // If the password is empty, that means it was not changed, so use the
-      // original password.
-      if (empty($this->value)) {
-        $this->value = $entity->original->{$this->getFieldDefinition()->getName()}->value;
-      }
-    }
-  }
-}
+class PasswordItem extends StringItem {}
diff --git a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
index b07f3e6..67dec06 100644
--- a/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
+++ b/core/modules/rest/src/Plugin/rest/resource/EntityResource.php
@@ -145,11 +145,13 @@ public function patch(EntityInterface $original_entity, EntityInterface $entity
       if ($field_name == $langcode_key && $field->isEmpty()) {
         continue;
       }
-
-      if (!$original_entity->get($field_name)->access('edit')) {
-        throw new AccessDeniedHttpException(SafeMarkup::format('Access denied on updating field @field.', array('@field' => $field_name)));
+      if ($field->isEmpty() && !$original_entity->get($field_name)->access('delete')) {
+        throw new AccessDeniedHttpException(SafeMarkup::format('Access denied on deleting field @field.', array('@field' => $field_name)));
       }
       $original_entity->set($field_name, $field->getValue());
+      if (!$original_entity->get($field_name)->access('update')) {
+        throw new AccessDeniedHttpException(SafeMarkup::format('Access denied on updating field @field.', array('@field' => $field_name)));
+      }
     }
 
     // Validate the received data before saving.
diff --git a/core/modules/rest/src/Tests/RESTTestBase.php b/core/modules/rest/src/Tests/RESTTestBase.php
index e8e1080..4856bde 100644
--- a/core/modules/rest/src/Tests/RESTTestBase.php
+++ b/core/modules/rest/src/Tests/RESTTestBase.php
@@ -332,16 +332,6 @@ protected function entityPermissions($entity_type, $operation) {
           case 'delete':
             return array('delete any resttest content');
         }
-
-      case 'user':
-        switch ($operation) {
-          case 'view':
-            return ['access user profiles'];
-
-          default:
-            return ['administer users'];
-
-        }
     }
   }
 
diff --git a/core/modules/rest/src/Tests/UpdateTest.php b/core/modules/rest/src/Tests/UpdateTest.php
index 481e33b..6046ce9 100644
--- a/core/modules/rest/src/Tests/UpdateTest.php
+++ b/core/modules/rest/src/Tests/UpdateTest.php
@@ -89,7 +89,7 @@ public function testPatchUpdate() {
 
     // Enable access protection for the text field.
     // @see entity_test_entity_field_access()
-    $entity->field_test_text->value = 'no edit access value';
+    $entity->field_test_text->value = 'no delete access value';
     $entity->field_test_text->format = 'plain_text';
     $entity->save();
 
@@ -99,7 +99,7 @@ public function testPatchUpdate() {
 
     // Re-load the entity from the database.
     $entity = entity_load($entity_type, $entity->id(), TRUE);
-    $this->assertEqual($entity->field_test_text->value, 'no edit access value', 'Text field was not deleted.');
+    $this->assertEqual($entity->field_test_text->value, 'no delete access value', 'Text field was not deleted.');
 
     // Try to update an access protected field.
     $normalized = $serializer->normalize($patch_entity, $this->defaultFormat, $context);
@@ -110,12 +110,9 @@ public function testPatchUpdate() {
 
     // Re-load the entity from the database.
     $entity = entity_load($entity_type, $entity->id(), TRUE);
-    $this->assertEqual($entity->field_test_text->value, 'no edit access value', 'Text field was not updated.');
+    $this->assertEqual($entity->field_test_text->value, 'no delete access value', 'Text field was not updated.');
 
     // Try to update the field with a text format this user has no access to.
-    // First change the original field value so we're allowed to edit it again.
-    $entity->field_test_text->value = 'test';
-    $entity->save();
     $patch_entity->set('field_test_text', array(
       'value' => 'test',
       'format' => 'full_html',
@@ -126,7 +123,7 @@ public function testPatchUpdate() {
 
     // Re-load the entity from the database.
     $entity = entity_load($entity_type, $entity->id(), TRUE);
-    $this->assertEqual($entity->field_test_text->format, 'plain_text', 'Text format was not updated.');
+    $this->assertEqual($entity->field_test_text->value, 'no delete access value', 'Text field was not updated.');
 
     // Restore the valid test value.
     $entity->field_test_text->value = $this->randomString();
@@ -163,68 +160,4 @@ public function testPatchUpdate() {
     $this->assertResponse(405);
   }
 
-  /**
-   * Tests several valid and invalid update requests for the 'user' entity type.
-   */
-  public function testUpdateUser() {
-    $serializer = $this->container->get('serializer');
-    $entity_type = 'user';
-    // Enables the REST service for 'user' entity type.
-    $this->enableService('entity:' . $entity_type, 'PATCH');
-    $permissions = $this->entityPermissions($entity_type, 'update');
-    $permissions[] = 'restful patch entity:' . $entity_type;
-    $account = $this->drupalCreateUser($permissions);
-    $account->set('mail', 'old-email@example.com');
-    $this->drupalLogin($account);
-
-    // Create an entity and save it to the database.
-    $account->save();
-    $account->set('changed', NULL);
-
-    // Try and set a new email without providing the password.
-    $account->set('mail', 'new-email@example.com');
-    $context = ['account' => $account];
-    $normalized = $serializer->normalize($account, $this->defaultFormat, $context);
-    $serialized = $serializer->serialize($normalized, $this->defaultFormat, $context);
-    $response = $this->httpRequest($account->urlInfo(), 'PATCH', $serialized, $this->defaultMimeType);
-    $this->assertResponse(422);
-    $error = Json::decode($response);
-    $this->assertEqual($error['error'], "Unprocessable Entity: validation failed.\nmail: Your current password is missing or incorrect; it's required to change the <em class=\"placeholder\">Email</em>.\n");
-
-    // Try and send the new email with a password.
-    $normalized['pass'][0]['existing'] = 'wrong';
-    $serialized = $serializer->serialize($normalized, $this->defaultFormat, $context);
-    $response = $this->httpRequest($account->urlInfo(), 'PATCH', $serialized, $this->defaultMimeType);
-    $this->assertResponse(422);
-    $error = Json::decode($response);
-    $this->assertEqual($error['error'], "Unprocessable Entity: validation failed.\nmail: Your current password is missing or incorrect; it's required to change the <em class=\"placeholder\">Email</em>.\n");
-
-    // Try again with the password.
-    $normalized['pass'][0]['existing'] = $account->pass_raw;
-    $serialized = $serializer->serialize($normalized, $this->defaultFormat, $context);
-    $this->httpRequest($account->urlInfo(), 'PATCH', $serialized, $this->defaultMimeType);
-    $this->assertResponse(204);
-
-    // Try to change the password without providing the current password.
-    $new_password = $this->randomString();
-    $normalized = $serializer->normalize($account, $this->defaultFormat, $context);
-    $normalized['pass'][0]['value'] = $new_password;
-    $serialized = $serializer->serialize($normalized, $this->defaultFormat, $context);
-    $response = $this->httpRequest($account->urlInfo(), 'PATCH', $serialized, $this->defaultMimeType);
-    $this->assertResponse(422);
-    $error = Json::decode($response);
-    $this->assertEqual($error['error'], "Unprocessable Entity: validation failed.\npass: Your current password is missing or incorrect; it's required to change the <em class=\"placeholder\">Password</em>.\n");
-
-    // Try again with the password.
-    $normalized['pass'][0]['existing'] = $account->pass_raw;
-    $serialized = $serializer->serialize($normalized, $this->defaultFormat, $context);
-    $this->httpRequest($account->urlInfo(), 'PATCH', $serialized, $this->defaultMimeType);
-    $this->assertResponse(204);
-
-    // Verify that we can log in with the new password.
-    $account->pass_raw = $new_password;
-    $this->drupalLogin($account);
-
-  }
-
 }
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module
index df80c1a..64418c7 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.module
+++ b/core/modules/system/tests/modules/entity_test/entity_test.module
@@ -343,7 +343,7 @@ function entity_test_entity_field_access($operation, FieldDefinitionInterface $f
       if ($items->value == 'no access value') {
         return AccessResult::forbidden()->cacheUntilEntityChanges($items->getEntity());
       }
-      elseif ($operation == 'edit' && $items->value == 'no edit access value') {
+      elseif ($operation == 'delete' && $items->value == 'no delete access value') {
         return AccessResult::forbidden()->cacheUntilEntityChanges($items->getEntity());
       }
     }
diff --git a/core/modules/user/src/AccountForm.php b/core/modules/user/src/AccountForm.php
index 16ab69f..f61fd06 100644
--- a/core/modules/user/src/AccountForm.php
+++ b/core/modules/user/src/AccountForm.php
@@ -154,6 +154,11 @@ public function form(array $form, FormStateInterface $form_state) {
 
       // The user must enter their current password to change to a new one.
       if ($user->id() == $account->id()) {
+        $form['account']['current_pass_required_values'] = array(
+          '#type' => 'value',
+          '#value' => $protected_values,
+        );
+
         $form['account']['current_pass'] = array(
           '#type' => 'password',
           '#title' => $this->t('Current password'),
@@ -168,6 +173,7 @@ public function form(array $form, FormStateInterface $form_state) {
         );
 
         $form_state->set('user', $account);
+        $form['#validate'][] = 'user_validate_current_pass';
       }
     }
     elseif (!$config->get('verify_mail') || $admin) {
@@ -342,12 +348,6 @@ public function buildEntity(array $form, FormStateInterface $form_state) {
         $account->$field_name = NULL;
       }
     }
-
-    // Set existing password if set in the form state.
-    if ($current_pass = $form_state->getValue('current_pass')) {
-      $account->setExistingPassword($current_pass);
-    }
-
     return $account;
   }
 
@@ -358,16 +358,11 @@ public function validate(array $form, FormStateInterface $form_state) {
     /** @var \Drupal\user\UserInterface $account */
     $account = parent::validate($form, $form_state);
 
-    // Skip the protected user field constraint if the user came from the
-    // password recovery page.
-    $account->_skipProtectedUserFieldConstraint = $form_state->get('user_pass_reset');
-
     // Customly trigger validation of manually added fields and add in
     // violations. This is necessary as entity form displays only invoke entity
     // validation for fields contained in the display.
     $field_names = array(
       'name',
-      'pass',
       'mail',
       'timezone',
       'langcode',
diff --git a/core/modules/user/src/Entity/User.php b/core/modules/user/src/Entity/User.php
index 54a268b..1cecfdc 100644
--- a/core/modules/user/src/Entity/User.php
+++ b/core/modules/user/src/Entity/User.php
@@ -8,6 +8,7 @@
 namespace Drupal\user\Entity;
 
 use Drupal\Core\Entity\ContentEntityBase;
+use Drupal\Core\Entity\EntityMalformedException;
 use Drupal\Core\Entity\EntityStorageInterface;
 use Drupal\Core\Entity\EntityTypeInterface;
 use Drupal\Core\Field\BaseFieldDefinition;
@@ -89,6 +90,24 @@ public function preSave(EntityStorageInterface $storage) {
       }
     }
 
+    // Update the user password if it has changed.
+    if ($this->isNew() || ($this->pass->value && $this->pass->value != $this->original->pass->value)) {
+      // Allow alternate password hashing schemes.
+      $this->pass->value = \Drupal::service('password')->hash(trim($this->pass->value));
+      // Abort if the hashing failed and returned FALSE.
+      if (!$this->pass->value) {
+        throw new EntityMalformedException('The entity does not have a password.');
+      }
+    }
+
+    if (!$this->isNew()) {
+      // If the password is empty, that means it was not changed, so use the
+      // original password.
+      if (empty($this->pass->value)) {
+        $this->pass->value = $this->original->pass->value;
+      }
+    }
+
     // Store account cancellation information.
     foreach (array('user_cancel_method', 'user_cancel_notify') as $key) {
       if (isset($this->{$key})) {
@@ -413,20 +432,6 @@ public function getChangedTime() {
   /**
    * {@inheritdoc}
    */
-  public function setExistingPassword($password) {
-    $this->get('pass')->existing = $password;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function checkExistingPassword(UserInterface $account_unchanged) {
-    return !empty($this->get('pass')->existing) && \Drupal::service('password')->check(trim($this->get('pass')->existing), $account_unchanged);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
   public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
     $fields['uid'] = BaseFieldDefinition::create('integer')
       ->setLabel(t('User ID'))
@@ -481,16 +486,14 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
 
     $fields['pass'] = BaseFieldDefinition::create('password')
       ->setLabel(t('Password'))
-      ->setDescription(t('The password of this user (hashed).'))
-      ->addConstraint('ProtectedUserField');
+      ->setDescription(t('The password of this user (hashed).'));
 
     $fields['mail'] = BaseFieldDefinition::create('email')
       ->setLabel(t('Email'))
       ->setDescription(t('The email of this user.'))
       ->setDefaultValue('')
       ->addConstraint('UserMailUnique')
-      ->addConstraint('UserMailRequired')
-      ->addConstraint('ProtectedUserField');
+      ->addConstraint('UserMailRequired');
 
     $fields['timezone'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Timezone'))
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php b/core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php
deleted file mode 100644
index fd3ca3d..0000000
--- a/core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraint.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraint.
- */
-
-namespace Drupal\user\Plugin\Validation\Constraint;
-
-use Symfony\Component\Validator\Constraint;
-
-/**
- * Checks if the plain text password is provided for editing a protected field.
- *
- * @Plugin(
- *   id = "ProtectedUserField",
- *   label = @Translation("Password required for protected field change", context = "Validation")
- * )
- */
-class ProtectedUserFieldConstraint extends Constraint {
-
-  /**
-   * Violation message.
-   *
-   * @var string
-   */
-  public $message = "Your current password is missing or incorrect; it's required to change the %name.";
-
-}
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php b/core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php
deleted file mode 100644
index d99fc5d..0000000
--- a/core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<?php
-/**
- * @file
- * Contains \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator.
- */
-
-namespace Drupal\user\Plugin\Validation\Constraint;
-
-use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
-use Drupal\Core\Session\AccountProxyInterface;
-use Drupal\user\UserStorageInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Symfony\Component\Validator\Constraint;
-use Symfony\Component\Validator\ConstraintValidator;
-
-/**
- * Validates the ProtectedUserFieldConstraint constraint.
- */
-class ProtectedUserFieldConstraintValidator extends ConstraintValidator implements ContainerInjectionInterface {
-
-  /**
-   * User storage handler.
-   *
-   * @var \Drupal\user\UserStorageInterface
-   */
-  protected $userStorage;
-
-  /**
-   * The current user.
-   *
-   * @var \Drupal\Core\Session\AccountProxyInterface
-   */
-  protected $currentUser;
-
-  /**
-   * Constructs the object.
-   *
-   * @param \Drupal\user\UserStorageInterface $user_storage
-   *   The user storage handler.
-   * @param \Drupal\Core\Session\AccountProxyInterface $current_user
-   *   The current user.
-   */
-  public function __construct(UserStorageInterface $user_storage, AccountProxyInterface $current_user) {
-    $this->userStorage = $user_storage;
-    $this->currentUser = $current_user;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public static function create(ContainerInterface $container) {
-    return new static(
-      $container->get('entity.manager')->getStorage('user'),
-      $container->get('current_user')
-    );
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function validate($items, Constraint $constraint) {
-    if (!isset($items)) {
-      return;
-    }
-    /* @var \Drupal\Core\Field\FieldItemListInterface $items */
-    $field = $items->getFieldDefinition();
-
-    /* @var \Drupal\user\UserInterface $account */
-    $account = $items->getEntity();
-    if (!isset($account) || !empty($account->_skipProtectedUserFieldConstraint)) {
-      // Looks like we are validating a field not being part of a user, or the
-      // constraint should be skipped, so do nothing.
-      return;
-    }
-
-    // Only validate for existing entities and if this is the current user.
-    if (!$account->isNew() && $account->id() == $this->currentUser->id()) {
-
-      /* @var \Drupal\user\UserInterface $account_unchanged */
-      $account_unchanged = $this->userStorage
-        ->loadUnchanged($account->id());
-
-      $changed = FALSE;
-
-      // Special case for the password, it being empty means that the existing
-      // password should not be changed, ignore empty password fields.
-      $value = $items->value;
-      if ($field->getName() != 'pass' || !empty($value)) {
-        // Compare the values of the field this is being validated on.
-        $changed = $items->getValue() != $account_unchanged->get($field->getName())->getValue();
-      }
-      if ($changed && (!$account->checkExistingPassword($account_unchanged))) {
-        $this->context->addViolation($constraint->message, array('%name' => $field->getLabel()));
-      }
-    }
-  }
-
-}
diff --git a/core/modules/user/src/Tests/UserEditTest.php b/core/modules/user/src/Tests/UserEditTest.php
index 46502f4..308fad9 100644
--- a/core/modules/user/src/Tests/UserEditTest.php
+++ b/core/modules/user/src/Tests/UserEditTest.php
@@ -47,7 +47,7 @@ function testUserEdit() {
     $edit = array();
     $edit['mail'] = $this->randomMachineName() . '@new.example.com';
     $this->drupalPostForm("user/" . $user1->id() . "/edit", $edit, t('Save'));
-    $this->assertRaw(t("Your current password is missing or incorrect; it's required to change the %name.", array('%name' => t('Email'))));
+    $this->assertRaw(t("Your current password is missing or incorrect; it's required to change the %name.", array('%name' => t('Email address'))));
 
     $edit['current_pass'] = $user1->pass_raw;
     $this->drupalPostForm("user/" . $user1->id() . "/edit", $edit, t('Save'));
diff --git a/core/modules/user/src/Tests/UserValidateCurrentPassCustomFormTest.php b/core/modules/user/src/Tests/UserValidateCurrentPassCustomFormTest.php
new file mode 100644
index 0000000..025a5ed
--- /dev/null
+++ b/core/modules/user/src/Tests/UserValidateCurrentPassCustomFormTest.php
@@ -0,0 +1,57 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\user\Tests\UserValidateCurrentPassCustomFormTest.
+ */
+
+namespace Drupal\user\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests user_validate_current_pass on a custom form.
+ *
+ * @group user
+ */
+class UserValidateCurrentPassCustomFormTest extends WebTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('user_form_test');
+
+  /**
+   * User with permission to view content.
+   */
+  protected $accessUser;
+
+  /**
+   * User permission to administer users.
+   */
+  protected $adminUser;
+
+  protected function setUp() {
+    parent::setUp();
+
+    // Create two users
+    $this->accessUser = $this->drupalCreateUser(array());
+    $this->adminUser = $this->drupalCreateUser(array('administer users'));
+  }
+
+  /**
+   * Tests that user_validate_current_pass can be reused on a custom form.
+   */
+  function testUserValidateCurrentPassCustomForm() {
+    $this->drupalLogin($this->adminUser);
+
+    // Submit the custom form with the admin user using the access user's password.
+    $edit = array();
+    $edit['user_form_test_field'] = $this->accessUser->getUsername();
+    $edit['current_pass'] = $this->accessUser->pass_raw;
+    $this->drupalPostForm('user_form_test_current_password/' . $this->accessUser->id(), $edit, t('Test'));
+    $this->assertText(t('The password has been validated and the form submitted successfully.'));
+  }
+}
diff --git a/core/modules/user/src/UserInterface.php b/core/modules/user/src/UserInterface.php
index 17f7b16..0797776 100644
--- a/core/modules/user/src/UserInterface.php
+++ b/core/modules/user/src/UserInterface.php
@@ -164,29 +164,4 @@ public function block();
    */
   public function getInitialEmail();
 
-  /**
-   * Sets the existing plain text password.
-   *
-   * Required for validation when changing the password, name or email fields.
-   *
-   * @param string $password
-   *   The existing plain text password of the user.
-   *
-   * @return $this
-   */
-  public function setExistingPassword($password);
-
-  /**
-   * Checks the existing password if set.
-   *
-   * @param \Drupal\user\UserInterface $account_unchanged
-   *   The unchanged user entity to compare against.
-   *
-   * @return bool
-   *   TRUE if the correct existing password was provided.
-   *
-   * @see UserInterface::setExistingPassword().
-   */
-  public function checkExistingPassword(UserInterface $account_unchanged);
-
 }
diff --git a/core/modules/user/tests/modules/user_form_test/src/Form/TestCurrentPassword.php b/core/modules/user/tests/modules/user_form_test/src/Form/TestCurrentPassword.php
new file mode 100644
index 0000000..3dd75e1
--- /dev/null
+++ b/core/modules/user/tests/modules/user_form_test/src/Form/TestCurrentPassword.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\user_form_test\Form\TestCurrentPassword.
+ */
+
+namespace Drupal\user_form_test\Form;
+
+use Drupal\Core\Form\FormBase;
+use Drupal\Core\Form\FormStateInterface;
+use Drupal\user\UserInterface;
+
+/**
+ * Provides a current password validation form.
+ */
+class TestCurrentPassword extends FormBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFormId() {
+    return 'user_form_test_current_password';
+  }
+
+  /**
+   * {@inheritdoc}
+   *
+   * @param \Drupal\user\Entity\UserInterface $user
+   *   The user account.
+   */
+  public function buildForm(array $form, FormStateInterface $form_state, UserInterface $user = NULL) {
+    $form_state->set('user', $user);
+    $form['user_form_test_field'] = array(
+      '#type' => 'textfield',
+      '#title' => $this->t('Test field'),
+      '#description' => $this->t('A field that would require a correct password to change.'),
+      '#required' => TRUE,
+    );
+
+    $form['current_pass'] = array(
+      '#type' => 'password',
+      '#title' => $this->t('Current password'),
+      '#size' => 25,
+      '#description' => $this->t('Enter your current password'),
+    );
+
+    $form['current_pass_required_values'] = array(
+      '#type' => 'value',
+      '#value' => array('user_form_test_field' => $this->t('Test field')),
+    );
+
+    $form['#validate'][] = 'user_validate_current_pass';
+    $form['submit'] = array(
+      '#type' => 'submit',
+      '#value' => $this->t('Test'),
+    );
+    return $form;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function submitForm(array &$form, FormStateInterface $form_state) {
+    drupal_set_message($this->t('The password has been validated and the form submitted successfully.'));
+  }
+
+}
diff --git a/core/modules/user/tests/modules/user_form_test/user_form_test.routing.yml b/core/modules/user/tests/modules/user_form_test/user_form_test.routing.yml
index 9b7f58a..78f813c 100644
--- a/core/modules/user/tests/modules/user_form_test/user_form_test.routing.yml
+++ b/core/modules/user/tests/modules/user_form_test/user_form_test.routing.yml
@@ -1,3 +1,10 @@
+user_form_test.current_password:
+  path: '/user_form_test_current_password/{user}'
+  defaults:
+    _form: '\Drupal\user_form_test\Form\TestCurrentPassword'
+  requirements:
+    _permission: 'administer users'
+
 user_form_test.cancel:
   path: '/user_form_test_cancel/{user}'
   defaults:
diff --git a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php b/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php
deleted file mode 100644
index 7e443d1..0000000
--- a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php
+++ /dev/null
@@ -1,313 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Tests\user\Unit\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidatorTest.
- */
-
-namespace Drupal\Tests\user\Unit\Plugin\Validation\Constraint;
-
-use Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraint;
-use Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator;
-use Symfony\Component\Validator\Tests\Constraints\AbstractConstraintValidatorTest;
-use Symfony\Component\Validator\Validation;
-
-/**
- * @coversDefaultClass \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator
- * @group user
- */
-class ProtectedUserFieldConstraintValidatorTest extends AbstractConstraintValidatorTest {
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function getApiVersion() {
-    return Validation::API_VERSION_2_4;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function createValidator() {
-    // Setup mocks that don't need to change.
-    $unchanged_field = $this->getMock('Drupal\Core\Field\FieldItemListInterface');
-    $unchanged_field->expects($this->any())
-      ->method('getValue')
-      ->willReturn('unchanged-value');
-
-    $unchanged_account = $this->getMock('Drupal\user\UserInterface');
-    $unchanged_account->expects($this->any())
-      ->method('get')
-      ->willReturn($unchanged_field);
-    $user_storage = $this->getMock('Drupal\user\UserStorageInterface');
-    $user_storage->expects($this->any())
-      ->method('loadUnchanged')
-      ->willReturn($unchanged_account);
-    $current_user = $this->getMock('Drupal\Core\Session\AccountProxyInterface');
-    $current_user->expects($this->any())
-      ->method('id')
-      ->willReturn('current-user');
-    return new ProtectedUserFieldConstraintValidator($user_storage, $current_user);
-  }
-
-  /**
-   * @covers ::validate
-   *
-   * @dataProvider providerTestValidate
-   */
-  public function testValidate($items, $expected_violation, $name = FALSE) {
-    $constraint = new ProtectedUserFieldConstraint();
-    $this->validator->validate($items, $constraint);
-    if ($expected_violation) {
-      $this->buildViolation($constraint->message)
-        ->setParameter('%name', $name)
-        ->assertRaised();
-    }
-    else {
-      $this->assertNoViolation();
-    }
-  }
-
-  /**
-   * Data provider for ::testValidate().
-   */
-  public function providerTestValidate() {
-    $cases = [];
-
-    // Case 1: Validation context should not be touched if no items are passed.
-    $cases[] = [NULL, FALSE];
-
-    // Case 2: Empty user should be ignored.
-    $field_definition = $this->getMock('Drupal\Core\Field\FieldDefinitionInterface');
-    $items = $this->getMock('Drupal\Core\Field\FieldItemListInterface');
-    $items->expects($this->once())
-      ->method('getFieldDefinition')
-      ->willReturn($field_definition);
-    $items->expects($this->once())
-      ->method('getEntity')
-      ->willReturn(NULL);
-    $cases[] = [$items, FALSE];
-
-    // Case 3: Account flagged to skip protected user should be ignored.
-    $field_definition = $this->getMock('Drupal\Core\Field\FieldDefinitionInterface');
-    $account = $this->getMock('Drupal\user\UserInterface');
-    $account->_skipProtectedUserFieldConstraint = TRUE;
-    $items = $this->getMock('Drupal\Core\Field\FieldItemListInterface');
-    $items->expects($this->once())
-      ->method('getFieldDefinition')
-      ->willReturn($field_definition);
-    $items->expects($this->once())
-      ->method('getEntity')
-      ->willReturn($account);
-    $cases[] = [$items, FALSE];
-
-    // Case 4: New user should be ignored.
-    $field_definition = $this->getMock('Drupal\Core\Field\FieldDefinitionInterface');
-    $account = $this->getMock('Drupal\user\UserInterface');
-    $account->expects($this->once())
-      ->method('isNew')
-      ->willReturn(TRUE);
-    $items = $this->getMock('Drupal\Core\Field\FieldItemListInterface');
-    $items->expects($this->once())
-      ->method('getFieldDefinition')
-      ->willReturn($field_definition);
-    $items->expects($this->once())
-      ->method('getEntity')
-      ->willReturn($account);
-    $cases[] = [$items, FALSE];
-
-    // Case 5: Mismatching user IDs should also be ignored.
-    $account = $this->getMock('Drupal\user\UserInterface');
-    $account->expects($this->once())
-      ->method('isNew')
-      ->willReturn(FALSE);
-    $account->expects($this->once())
-      ->method('id')
-      ->willReturn('not-current-user');
-    $items = $this->getMock('Drupal\Core\Field\FieldItemListInterface');
-    $items->expects($this->once())
-      ->method('getFieldDefinition')
-      ->willReturn($field_definition);
-    $items->expects($this->once())
-      ->method('getEntity')
-      ->willReturn($account);
-    $cases[] = [$items, FALSE];
-
-    // Case 6: Non-password fields that have not changed should be ignored.
-    $field_definition = $this->getMock('Drupal\Core\Field\FieldDefinitionInterface');
-    $field_definition->expects($this->exactly(2))
-      ->method('getName')
-      ->willReturn('field_not_password');
-    $account = $this->getMock('Drupal\user\UserInterface');
-    $account->expects($this->once())
-      ->method('isNew')
-      ->willReturn(FALSE);
-    $account->expects($this->exactly(2))
-      ->method('id')
-      ->willReturn('current-user');
-    $account->expects($this->never())
-      ->method('checkExistingPassword');
-    $items = $this->getMock('Drupal\Core\Field\FieldItemListInterface');
-    $items->expects($this->once())
-      ->method('getFieldDefinition')
-      ->willReturn($field_definition);
-    $items->expects($this->once())
-      ->method('getEntity')
-      ->willReturn($account);
-    $items->expects($this->once())
-      ->method('getValue')
-      ->willReturn('unchanged-value');
-    $cases[] = [$items, FALSE];
-
-    // Case 7: Password field with no value set should be ignored.
-    $field_definition = $this->getMock('Drupal\Core\Field\FieldDefinitionInterface');
-    $field_definition->expects($this->once())
-      ->method('getName')
-      ->willReturn('pass');
-    $account = $this->getMock('Drupal\user\UserInterface');
-    $account->expects($this->once())
-      ->method('isNew')
-      ->willReturn(FALSE);
-    $account->expects($this->exactly(2))
-      ->method('id')
-      ->willReturn('current-user');
-    $account->expects($this->never())
-      ->method('checkExistingPassword');
-    $items = $this->getMock('Drupal\Core\Field\FieldItemListInterface');
-    $items->expects($this->once())
-      ->method('getFieldDefinition')
-      ->willReturn($field_definition);
-    $items->expects($this->once())
-      ->method('getEntity')
-      ->willReturn($account);
-    $cases[] = [$items, FALSE];
-
-    // Case 8: Non-password field changed, but user has passed provided current
-    // password.
-    $field_definition = $this->getMock('Drupal\Core\Field\FieldDefinitionInterface');
-    $field_definition->expects($this->exactly(2))
-      ->method('getName')
-      ->willReturn('field_not_password');
-    $account = $this->getMock('Drupal\user\UserInterface');
-    $account->expects($this->once())
-      ->method('isNew')
-      ->willReturn(FALSE);
-    $account->expects($this->exactly(2))
-      ->method('id')
-      ->willReturn('current-user');
-    $account->expects($this->once())
-      ->method('checkExistingPassword')
-      ->willReturn(TRUE);
-    $items = $this->getMock('Drupal\Core\Field\FieldItemListInterface');
-    $items->expects($this->once())
-      ->method('getFieldDefinition')
-      ->willReturn($field_definition);
-    $items->expects($this->once())
-      ->method('getEntity')
-      ->willReturn($account);
-    $items->expects($this->once())
-      ->method('getValue')
-      ->willReturn('changed-value');
-    $cases[] = [$items, FALSE];
-
-    // Case 9: Password field changed, current password confirmed.
-    $field_definition = $this->getMock('Drupal\Core\Field\FieldDefinitionInterface');
-    $field_definition->expects($this->exactly(2))
-      ->method('getName')
-      ->willReturn('pass');
-    $account = $this->getMock('Drupal\user\UserInterface');
-    $account->expects($this->once())
-      ->method('isNew')
-      ->willReturn(FALSE);
-    $account->expects($this->exactly(2))
-      ->method('id')
-      ->willReturn('current-user');
-    $account->expects($this->once())
-      ->method('checkExistingPassword')
-      ->willReturn(TRUE);
-    $items = $this->getMock('Drupal\Core\Field\FieldItemListInterface');
-    $items->expects($this->once())
-      ->method('getFieldDefinition')
-      ->willReturn($field_definition);
-    $items->expects($this->once())
-      ->method('getEntity')
-      ->willReturn($account);
-    $items->expects($this->any())
-      ->method('getValue')
-      ->willReturn('changed-value');
-    $items->expects($this->once())
-      ->method('__get')
-      ->with('value')
-      ->willReturn('changed-value');
-    $cases[] = [$items, FALSE];
-
-    // The below calls should result in a violation.
-
-    // Case 10: Password field changed, current password not confirmed.
-    $field_definition = $this->getMock('Drupal\Core\Field\FieldDefinitionInterface');
-    $field_definition->expects($this->exactly(2))
-      ->method('getName')
-      ->willReturn('pass');
-    $field_definition->expects($this->any())
-      ->method('getLabel')
-      ->willReturn('Password');
-    $account = $this->getMock('Drupal\user\UserInterface');
-    $account->expects($this->once())
-      ->method('isNew')
-      ->willReturn(FALSE);
-    $account->expects($this->exactly(2))
-      ->method('id')
-      ->willReturn('current-user');
-    $account->expects($this->once())
-      ->method('checkExistingPassword')
-      ->willReturn(FALSE);
-    $items = $this->getMock('Drupal\Core\Field\FieldItemListInterface');
-    $items->expects($this->once())
-      ->method('getFieldDefinition')
-      ->willReturn($field_definition);
-    $items->expects($this->once())
-      ->method('getEntity')
-      ->willReturn($account);
-    $items->expects($this->once())
-      ->method('getValue')
-      ->willReturn('changed-value');
-    $items->expects($this->once())
-      ->method('__get')
-      ->with('value')
-      ->willReturn('changed-value');
-    $cases[] = [$items, TRUE, 'Password'];
-
-    // Case 11: Non-password field changed, current password not confirmed.
-    $field_definition = $this->getMock('Drupal\Core\Field\FieldDefinitionInterface');
-    $field_definition->expects($this->exactly(2))
-      ->method('getName')
-      ->willReturn('field_not_password');
-    $field_definition->expects($this->any())
-      ->method('getLabel')
-      ->willReturn('Protected field');
-    $account = $this->getMock('Drupal\user\UserInterface');
-    $account->expects($this->once())
-      ->method('isNew')
-      ->willReturn(FALSE);
-    $account->expects($this->exactly(2))
-      ->method('id')
-      ->willReturn('current-user');
-    $account->expects($this->once())
-      ->method('checkExistingPassword')
-      ->willReturn(FALSE);
-    $items = $this->getMock('Drupal\Core\Field\FieldItemListInterface');
-    $items->expects($this->once())
-      ->method('getFieldDefinition')
-      ->willReturn($field_definition);
-    $items->expects($this->once())
-      ->method('getEntity')
-      ->willReturn($account);
-    $items->expects($this->once())
-      ->method('getValue')
-      ->willReturn('changed-value');
-    $cases[] = [$items, TRUE, 'Protected field'];
-
-    return $cases;
-  }
-
-}
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 2497ec0..dd37814 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -405,6 +405,30 @@ function user_user_view(array &$build, UserInterface $account, EntityViewDisplay
 }
 
 /**
+ * Form validation handler for the current password on the user account form.
+ *
+ * @see AccountForm::form()
+ */
+function user_validate_current_pass(&$form, FormStateInterface $form_state) {
+  $account = $form_state->get('user');
+  foreach ($form_state->getValue('current_pass_required_values') as $key => $name) {
+    // This validation only works for required textfields (like mail) or
+    // form values like password_confirm that have their own validation
+    // that prevent them from being empty if they are changed.
+    $current_value = $account->hasField($key) ? $account->get($key)->value : $account->$key;
+    if ((strlen(trim($form_state->getValue($key))) > 0) && ($form_state->getValue($key) != $current_value)) {
+      $current_pass_failed = $form_state->isValueEmpty('current_pass') || !\Drupal::service('password')->check($form_state->getValue('current_pass'), $account);
+      if ($current_pass_failed) {
+        $form_state->setErrorByName('current_pass', t("Your current password is missing or incorrect; it's required to change the %name.", array('%name' => $name)));
+        $form_state->setErrorByName($key);
+      }
+      // We only need to check the password once.
+      break;
+    }
+  }
+}
+
+/**
  * Implements hook_preprocess_HOOK() for block templates.
  */
 function user_preprocess_block(&$variables) {
diff --git a/core/vendor/composer/installed.json b/core/vendor/composer/installed.json
index 5b20eb7..625c282 100644
--- a/core/vendor/composer/installed.json
+++ b/core/vendor/composer/installed.json
@@ -1219,6 +1219,66 @@
         ]
     },
     {
+        "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"
+        ]
+    },
+    {
         "name": "egulias/email-validator",
         "version": "1.2.5",
         "version_normalized": "1.2.5.0",
@@ -1323,6 +1383,58 @@
         ]
     },
     {
+        "name": "guzzlehttp/ringphp",
+        "version": "1.0.3",
+        "version_normalized": "1.0.3.0",
+        "source": {
+            "type": "git",
+            "url": "https://github.com/guzzle/RingPHP.git",
+            "reference": "e7c28f96c5ac12ab0e63412cfc15989756fcb964"
+        },
+        "dist": {
+            "type": "zip",
+            "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/e7c28f96c5ac12ab0e63412cfc15989756fcb964",
+            "reference": "e7c28f96c5ac12ab0e63412cfc15989756fcb964",
+            "shasum": ""
+        },
+        "require": {
+            "guzzlehttp/streams": "~3.0",
+            "php": ">=5.4.0",
+            "react/promise": "~2.0"
+        },
+        "require-dev": {
+            "ext-curl": "*",
+            "phpunit/phpunit": "~4.0"
+        },
+        "suggest": {
+            "ext-curl": "Guzzle will use specific adapters if cURL is present"
+        },
+        "time": "2014-11-04 07:01:14",
+        "type": "library",
+        "extra": {
+            "branch-alias": {
+                "dev-master": "1.0-dev"
+            }
+        },
+        "installation-source": "dist",
+        "autoload": {
+            "psr-4": {
+                "GuzzleHttp\\Ring\\": "src/"
+            }
+        },
+        "notification-url": "https://packagist.org/downloads/",
+        "license": [
+            "MIT"
+        ],
+        "authors": [
+            {
+                "name": "Michael Dowling",
+                "email": "mtdowling@gmail.com",
+                "homepage": "https://github.com/mtdowling"
+            }
+        ]
+    },
+    {
         "name": "easyrdf/easyrdf",
         "version": "0.9.0",
         "version_normalized": "0.9.0.0",
@@ -3044,118 +3156,5 @@
         ],
         "description": "Symfony BrowserKit Component",
         "homepage": "http://symfony.com"
-    },
-    {
-        "name": "guzzlehttp/guzzle",
-        "version": "5.2.0",
-        "version_normalized": "5.2.0.0",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/guzzle/guzzle.git",
-            "reference": "475b29ccd411f2fa8a408e64576418728c032cfa"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://api.github.com/repos/guzzle/guzzle/zipball/475b29ccd411f2fa8a408e64576418728c032cfa",
-            "reference": "475b29ccd411f2fa8a408e64576418728c032cfa",
-            "shasum": ""
-        },
-        "require": {
-            "guzzlehttp/ringphp": "~1.0",
-            "php": ">=5.4.0"
-        },
-        "require-dev": {
-            "ext-curl": "*",
-            "phpunit/phpunit": "~4.0",
-            "psr/log": "~1.0"
-        },
-        "time": "2015-01-28 01:03:29",
-        "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"
-        ]
-    },
-    {
-        "name": "guzzlehttp/ringphp",
-        "version": "1.0.7",
-        "version_normalized": "1.0.7.0",
-        "source": {
-            "type": "git",
-            "url": "https://github.com/guzzle/RingPHP.git",
-            "reference": "52d868f13570a9a56e5fce6614e0ec75d0f13ac2"
-        },
-        "dist": {
-            "type": "zip",
-            "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/52d868f13570a9a56e5fce6614e0ec75d0f13ac2",
-            "reference": "52d868f13570a9a56e5fce6614e0ec75d0f13ac2",
-            "shasum": ""
-        },
-        "require": {
-            "guzzlehttp/streams": "~3.0",
-            "php": ">=5.4.0",
-            "react/promise": "~2.0"
-        },
-        "require-dev": {
-            "ext-curl": "*",
-            "phpunit/phpunit": "~4.0"
-        },
-        "suggest": {
-            "ext-curl": "Guzzle will use specific adapters if cURL is present"
-        },
-        "time": "2015-03-30 01:43:20",
-        "type": "library",
-        "extra": {
-            "branch-alias": {
-                "dev-master": "1.0-dev"
-            }
-        },
-        "installation-source": "dist",
-        "autoload": {
-            "psr-4": {
-                "GuzzleHttp\\Ring\\": "src/"
-            }
-        },
-        "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 API and specification that abstracts away the details of HTTP into a single PHP function."
     }
 ]
diff --git a/core/vendor/guzzlehttp/guzzle/CHANGELOG.md b/core/vendor/guzzlehttp/guzzle/CHANGELOG.md
index caafb42..e997e10 100644
--- a/core/vendor/guzzlehttp/guzzle/CHANGELOG.md
+++ b/core/vendor/guzzlehttp/guzzle/CHANGELOG.md
@@ -1,35 +1,5 @@
 # CHANGELOG
 
-## 5.2.0 - 2015-01-27
-
-* Added `AppliesHeadersInterface` to make applying headers to a request based
-  on the body more generic and not specific to `PostBodyInterface`.
-* Reduced the number of stack frames needed to send requests.
-* Nested futures are now resolved in the client rather than the RequestFsm
-* Finishing state transitions is now handled in the RequestFsm rather than the
-  RingBridge.
-* Added a guard in the Pool class to not use recursion for request retries.
-
-## 5.1.0 - 2014-12-19
-
-* Pool class no longer uses recursion when a request is intercepted.
-* The size of a Pool can now be dynamically adjusted using a callback.
-  See https://github.com/guzzle/guzzle/pull/943.
-* Setting a request option to `null` when creating a request with a client will
-  ensure that the option is not set. This allows you to overwrite default
-  request options on a per-request basis.
-  See https://github.com/guzzle/guzzle/pull/937.
-* Added the ability to limit which protocols are allowed for redirects by
-  specifying a `protocols` array in the `allow_redirects` request option.
-* Nested futures due to retries are now resolved when waiting for synchronous
-  responses. See https://github.com/guzzle/guzzle/pull/947.
-* `"0"` is now an allowed URI path. See
-  https://github.com/guzzle/guzzle/pull/935.
-* `Query` no longer typehints on the `$query` argument in the constructor,
-  allowing for strings and arrays.
-* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle
-  specific exceptions if necessary.
-
 ## 5.0.3 - 2014-11-03
 
 This change updates query strings so that they are treated as un-encoded values
@@ -101,10 +71,10 @@ The breaking changes in this release are relatively minor. The biggest thing to
 look out for is that request and response objects no longer implement fluent
 interfaces.
 
-* Removed the fluent interfaces (i.e., `return $this`) from requests,
-  responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`,
-  `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and
-  `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of
+* Removed the fluent interfaces (i.e., ``return $this``) from requests,
+  responses, ``GuzzleHttp\Collection``, ``GuzzleHttp\Url``,
+  ``GuzzleHttp\Query``, ``GuzzleHttp\Post\PostBody``, and
+  ``GuzzleHttp\Cookie\SetCookie``. This blog post provides a good outline of
   why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/.
   This also makes the Guzzle message interfaces compatible with the current
   PSR-7 message proposal.
@@ -114,7 +84,7 @@ interfaces.
   moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to
   `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to
   `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be
-  `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php
+  `GuzzleHttp\Pool::batch`, which returns a bjectStorage`. Using functions.php
   caused problems for many users: they aren't PSR-4 compliant, require an
   explicit include, and needed an if-guard to ensure that the functions are not
   declared multiple times.
@@ -135,10 +105,10 @@ interfaces.
   written to.
 * Removed the `asArray` parameter from
   `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header
-  value as an array, then use the newly added `getHeaderAsArray()` method of
-  `MessageInterface`. This change makes the Guzzle interfaces compatible with
+  value as an array, then use the newly added ``getHeaderAsArray()`` method of
+  ``MessageInterface``. This change makes the Guzzle interfaces compatible with
   the PSR-7 interfaces.
-* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add
+* ``GuzzleHttp\Message\MessageFactory`` no longer allows subclasses to add
   custom request options using double-dispatch (this was an implementation
   detail). Instead, you should now provide an associative array to the
   constructor which is a mapping of the request option name mapping to a
@@ -151,9 +121,9 @@ interfaces.
     * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a
       `maxLen` parameter. This update makes the Guzzle streams project
       compatible with the current PSR-7 proposal.
-    * `GuzzleHttp\Stream\Stream::__construct`,
-      `GuzzleHttp\Stream\Stream::factory`, and
-      `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second
+    * ``GuzzleHttp\Stream\Stream::__construct``,
+      ``GuzzleHttp\Stream\Stream::factory``, and
+      ``GuzzleHttp\Stream\Utils::create`` no longer accept a size in the second
       argument. They now accept an associative array of options, including the
       "size" key and "metadata" key which can be used to provide custom metadata.
 
@@ -389,7 +359,7 @@ interfaces.
 * Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`.
 * Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody()
 * Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin
-* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests
+* Bug fix: Visiting XML attributes first before visting XML children when serializing requests
 * Bug fix: Properly parsing headers that contain commas contained in quotes
 * Bug fix: mimetype guessing based on a filename is now case-insensitive
 
@@ -532,7 +502,7 @@ interfaces.
   directly via interfaces
 * Removed the injecting of a request object onto a response object. The methods to get and set a request still exist
   but are a no-op until removed.
-* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a
+* Most classes that used to require a ``Guzzle\Service\Command\CommandInterface` typehint now request a
   `Guzzle\Service\Command\ArrayCommandInterface`.
 * Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response
   on a request while the request is still being transferred
@@ -547,7 +517,7 @@ interfaces.
 ## 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 across the board (when an event is meant to fire once, it will now remove
+* Bug: Better cleanup of one-time events accross the board (when an event is meant to fire once, it will now remove
   itself from the EventDispatcher)
 * Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values
 * Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too
@@ -863,15 +833,15 @@ interfaces.
 * Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body
 * Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new
 * Added multiple inheritance to service description commands
-* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()`
+* Added an ApiCommandInterface and added ``getParamNames()`` and ``hasParam()``
 * 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
 
 * 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()`
-* Bug: `+` is now treated as an encoded space when parsing query strings
+* Bug: A Collection object is no longer created each time a call is made to ``Guzzle\Service\Command\AbstractCommand::getRequestHeaders()``
+* Bug: ``+`` is now treated as an encoded space when parsing query strings
 * QueryString and Collection performance improvements
 * Allowing dot notation for class paths in filters attribute of a service descriptions
 
@@ -888,7 +858,7 @@ interfaces.
     * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool)
     * Changed the aggregation functions of QueryString to be static methods
     * Can now use fromString() with querystrings that have a leading ?
-* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters
+* cURL configuration values can be specified in service descriptions using ``curl.`` prefixed parameters
 * Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body
 * Cookies are no longer URL decoded by default
 * Bug: URI template variables set to null are no longer expanded
diff --git a/core/vendor/guzzlehttp/guzzle/UPGRADING.md b/core/vendor/guzzlehttp/guzzle/UPGRADING.md
index ee8c39d..d0f55bc 100644
--- a/core/vendor/guzzlehttp/guzzle/UPGRADING.md
+++ b/core/vendor/guzzlehttp/guzzle/UPGRADING.md
@@ -503,7 +503,7 @@ allow developers to more easily extend and decorate stream behavior.
 ## Metadata streams
 
 `GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams
-that contain additional metadata accessible via `getMetadata()`.
+that contain additonal metadata accessible via `getMetadata()`.
 `GuzzleHttp\Stream\StreamInterface::getMetadata` and
 `GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed.
 
diff --git a/core/vendor/guzzlehttp/guzzle/build/packager.php b/core/vendor/guzzlehttp/guzzle/build/packager.php
index 724bf63..96afa93 100644
--- a/core/vendor/guzzlehttp/guzzle/build/packager.php
+++ b/core/vendor/guzzlehttp/guzzle/build/packager.php
@@ -13,7 +13,7 @@
 
 // Copy each dependency to the staging directory. Copy *.php and *.pem files.
 $packager->recursiveCopy('src', 'GuzzleHttp', ['php']);
-$packager->recursiveCopy('vendor/react/promise/src', 'React/Promise');
+$packager->recursiveCopy('vendor/react/promise/src', '');
 $packager->recursiveCopy('vendor/guzzlehttp/ringphp/src', 'GuzzleHttp/Ring');
 $packager->recursiveCopy('vendor/guzzlehttp/streams/src', 'GuzzleHttp/Stream');
 $packager->createAutoloader(['React/Promise/functions.php']);
diff --git a/core/vendor/guzzlehttp/guzzle/docs/clients.rst b/core/vendor/guzzlehttp/guzzle/docs/clients.rst
index 0614a25..c5aed63 100644
--- a/core/vendor/guzzlehttp/guzzle/docs/clients.rst
+++ b/core/vendor/guzzlehttp/guzzle/docs/clients.rst
@@ -173,12 +173,6 @@ response has completed.
     If an exception occurred while transferring the future response, then the
     exception encountered will be thrown when dereferencing.
 
-.. note::
-
-    It depends on the RingPHP handler used by a client, but you typically need
-    to use the same RingPHP handler in order to utilize asynchronous requests
-    across multiple clients.
-
 Asynchronous Error Handling
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -530,7 +524,7 @@ json
 
 .. code-block:: php
 
-    $request = $client->createRequest('PUT', '/put', ['json' => ['foo' => 'bar']]);
+    $request = $client->createRequest('/put', ['json' => ['foo' => 'bar']]);
     echo $request->getHeader('Content-Type');
     // application/json
     echo $request->getBody();
@@ -707,15 +701,7 @@ allow_redirects
 :Types:
     - bool
     - array
-:Default:
-    ::
-
-        [
-            'max'       => 5,
-            'strict'    => false,
-            'referer'   => true,
-            'protocols' => ['http', 'https']
-        ]
+:Default: ``['max' => 5, 'strict' => false, 'referer' => true]``
 
 Set to ``false`` to disable redirects.
 
@@ -735,22 +721,19 @@ number of 5 redirects.
     // 200
 
 Pass an associative array containing the 'max' key to specify the maximum
-number of redirects, provide a 'strict' key value to specify whether or not to
-use strict RFC compliant redirects (meaning redirect POST requests with POST
-requests vs. doing what most browsers do which is redirect POST requests with
-GET requests), provide a 'referer' key to specify whether or not the "Referer"
-header should be added when redirecting, and provide a 'protocols' array that
-specifies which protocols are supported for redirects (defaults to
-``['http', 'https']``).
+number of redirects, optionally provide a 'strict' key value to specify
+whether or not to use strict RFC compliant redirects (meaning redirect POST
+requests with POST requests vs. doing what most browsers do which is redirect
+POST requests with GET requests), and optionally provide a 'referer' key to
+specify whether or not the "Referer" header should be added when redirecting.
 
 .. code-block:: php
 
     $res = $client->get('/redirect/3', [
         'allow_redirects' => [
-            'max'       => 10,       // allow at most 10 redirects.
-            'strict'    => true,     // use "strict" RFC compliant redirects.
-            'referer'   => true,     // add a Referer header
-            'protocols' => ['https'] // only allow https URLs
+            'max'     => 10,
+            'strict'  => true,
+            'referer' => true
         ]
     ]);
     echo $res->getStatusCode();
diff --git a/core/vendor/guzzlehttp/guzzle/docs/events.rst b/core/vendor/guzzlehttp/guzzle/docs/events.rst
index 647dcd0..4dae96b 100644
--- a/core/vendor/guzzlehttp/guzzle/docs/events.rst
+++ b/core/vendor/guzzlehttp/guzzle/docs/events.rst
@@ -11,12 +11,12 @@ Event Emitters
 ==============
 
 Clients, requests, and any other class that implements the
-``GuzzleHttp\Event\HasEmitterInterface`` interface have a
-``GuzzleHttp\Event\Emitter`` object. You can add event *listeners* and
+``GuzzleHttp\Common\HasEmitterInterface`` interface have a
+``GuzzleHttp\Common\EventEmitter`` object. You can add event *listeners* and
 event *subscribers* to an event *emitter*.
 
 emitter
-    An object that implements ``GuzzleHttp\Event\EmitterInterface``. This
+    An object that implements ``GuzzleHttp\Common\EventEmitterInterface``. This
     object emits named events to event listeners. You may register event
     listeners on subscribers on an emitter.
 
@@ -58,7 +58,7 @@ propagation
 Getting an EventEmitter
 -----------------------
 
-You can get the event emitter of ``GuzzleHttp\Event\HasEmitterInterface``
+You can get the event emitter of ``GuzzleHttp\Common\HasEmitterInterface``
 object using the the ``getEmitter()`` method. Here's an example of getting a
 client object's event emitter.
 
@@ -95,7 +95,7 @@ event is triggered, and optionally provide a priority.
     });
 
 When a listener is triggered, it is passed an event that implements the
-``GuzzleHttp\Event\EventInterface`` interface, the name of the event, and the
+``GuzzleHttp\Common\EventInterface`` interface, the name of the event, and the
 event emitter itself. The above example could more verbosely be written as
 follows:
 
@@ -134,7 +134,7 @@ state. This technique is used in Guzzle extensively when intercepting error
 events with responses.
 
 You can stop the propagation of an event using the ``stopPropagation()`` method
-of a ``GuzzleHttp\Event\EventInterface`` object:
+of a ``GuzzleHttp\Common\EventInterface`` object:
 
 .. code-block:: php
 
@@ -168,7 +168,7 @@ Event Subscribers
 -----------------
 
 Event subscribers are classes that implement the
-``GuzzleHttp\Event\SubscriberInterface`` object. They are used to register
+``GuzzleHttp\Common\EventSubscriberInterface`` object. They are used to register
 one or more event listeners to methods of the class. Event subscribers tell
 event emitters exactly which events to listen to and what method to invoke on
 the class when the event is triggered by called the ``getEvents()`` method of
@@ -213,18 +213,6 @@ priority of the listener (as shown in the ``before`` listener in the example).
         }
     }
 
-To register the listeners the subscriber needs to be attached to the emitter:
-
-.. code-block:: php
-
-    $client = new GuzzleHttp\Client();
-    $emitter = $client->getEmitter();
-    $subscriber = new SimpleSubscriber();
-    $emitter->attach($subscriber);
-
-    //to remove the listeners
-    $emitter->detach($subscriber);
-
 .. note::
 
     You can specify event priorities using integers or ``"first"`` and
@@ -327,7 +315,7 @@ a ``GuzzleHttp\Event\BeforeEvent``.
 .. code-block:: php
 
     use GuzzleHttp\Client;
-    use GuzzleHttp\Event\EmitterInterface;
+    use GuzzleHttp\Common\EmitterInterface;
     use GuzzleHttp\Event\BeforeEvent;
 
     $client = new Client(['base_url' => 'http://httpbin.org']);
@@ -492,7 +480,7 @@ end
 ---
 
 The ``end`` event is a terminal event, emitted once per request, that provides
-access to the response that was received or the exception that was encountered.
+access to the repsonse that was received or the exception that was encountered.
 The event emitted is a ``GuzzleHttp\Event\EndEvent``.
 
 This event can be intercepted, but keep in mind that the ``complete`` event
diff --git a/core/vendor/guzzlehttp/guzzle/docs/faq.rst b/core/vendor/guzzlehttp/guzzle/docs/faq.rst
index a8e9ad0..8457c7e 100644
--- a/core/vendor/guzzlehttp/guzzle/docs/faq.rst
+++ b/core/vendor/guzzlehttp/guzzle/docs/faq.rst
@@ -64,7 +64,7 @@ an HTTP response into a more meaningful model object.
 - `Guzzle Command <https://github.com/guzzle/command>`_: Provides the building
   blocks for service description abstraction.
 - `Guzzle Services <https://github.com/guzzle/guzzle-services>`_: Provides an
-  implementation of "Guzzle Command" that utilizes Guzzle's service description
+  implementation of "Guzzle Command" that utlizes Guzzle's service description
   format.
 
 Does Guzzle require cURL?
@@ -91,7 +91,7 @@ Can Guzzle send asynchronous requests?
 Yes. Pass the ``future`` true request option to a request to send it
 asynchronously. Guzzle will then return a ``GuzzleHttp\Message\FutureResponse``
 object that can be used synchronously by accessing the response object like a
-normal response, and it can be used asynchronously using a promise that is
+normal response, and it can be used asynchronoulsy using a promise that is
 notified when the response is resolved with a real response or rejected with an
 exception.
 
diff --git a/core/vendor/guzzlehttp/guzzle/docs/http-messages.rst b/core/vendor/guzzlehttp/guzzle/docs/http-messages.rst
index 0c6527a..4144dc4 100644
--- a/core/vendor/guzzlehttp/guzzle/docs/http-messages.rst
+++ b/core/vendor/guzzlehttp/guzzle/docs/http-messages.rst
@@ -351,7 +351,7 @@ method of a request.
     $request = $client->createRequest('GET', '/');
     $config = $request->getConfig();
 
-The config object is a ``GuzzleHttp\Collection`` object that acts like
+The config object is a ``GuzzleHttp\Common\Collection`` object that acts like
 an associative array. You can grab values from the collection using array like
 access. You can also modify and remove values using array like access.
 
@@ -393,7 +393,7 @@ allow customization through request configuration options.
 Event Emitter
 -------------
 
-Request objects implement ``GuzzleHttp\Event\HasEmitterInterface``, so they
+Request objects implement ``GuzzleHttp\Common\HasEmitterInterface``, so they
 have a method called ``getEmitter()`` that can be used to get an event emitter
 used by the request. Any listener or subscriber attached to a request will only
 be triggered for the lifecycle events of a specific request. Conversely, adding
diff --git a/core/vendor/guzzlehttp/guzzle/src/Client.php b/core/vendor/guzzlehttp/guzzle/src/Client.php
index f1779eb..c8045a1 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Client.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Client.php
@@ -177,14 +177,26 @@ public function getBaseUrl()
 
     public function createRequest($method, $url = null, array $options = [])
     {
-        $options = $this->mergeDefaults($options);
+        $headers = $this->mergeDefaults($options);
         // Use a clone of the client's emitter
         $options['config']['emitter'] = clone $this->getEmitter();
-        $url = $url || (is_string($url) && strlen($url))
-            ? $this->buildUrl($url)
-            : (string) $this->baseUrl;
 
-        return $this->messageFactory->createRequest($method, $url, $options);
+        $request = $this->messageFactory->createRequest(
+            $method,
+            $url ? (string) $this->buildUrl($url) : (string) $this->baseUrl,
+            $options
+        );
+
+        // Merge in default headers
+        if ($headers) {
+            foreach ($headers as $key => $value) {
+                if (!$request->hasHeader($key)) {
+                    $request->setHeader($key, $value);
+                }
+            }
+        }
+
+        return $request;
     }
 
     public function get($url = null, $options = [])
@@ -224,31 +236,30 @@ public function options($url = null, array $options = [])
 
     public function send(RequestInterface $request)
     {
-        $isFuture = $request->getConfig()->get('future');
-        $trans = new Transaction($this, $request, $isFuture);
+        $trans = new Transaction($this, $request);
         $fn = $this->fsm;
 
-        try {
-            $fn($trans);
-            if ($isFuture) {
+        // Ensure a future response is returned if one was requested.
+        if ($request->getConfig()->get('future')) {
+            try {
+                $fn($trans);
                 // Turn the normal response into a future if needed.
                 return $trans->response instanceof FutureInterface
                     ? $trans->response
                     : new FutureResponse(new FulfilledPromise($trans->response));
-            }
-            // Resolve deep futures if this is not a future
-            // transaction. This accounts for things like retries
-            // that do not have an immediate side-effect.
-            while ($trans->response instanceof FutureInterface) {
-                $trans->response = $trans->response->wait();
-            }
-            return $trans->response;
-        } catch (\Exception $e) {
-            if ($isFuture) {
-                // Wrap the exception in a promise
+            } catch (RequestException $e) {
+                // Wrap the exception in a promise if the user asked for a future.
                 return new FutureResponse(new RejectedPromise($e));
             }
-            throw RequestException::wrapException($trans->request, $e);
+        } else {
+            try {
+                $fn($trans);
+                return $trans->response instanceof FutureInterface
+                    ? $trans->response->wait()
+                    : $trans->response;
+            } catch (\Exception $e) {
+                throw RequestException::wrapException($trans->request, $e);
+            }
         }
     }
 
@@ -281,10 +292,9 @@ protected function getDefaultOptions()
     /**
      * Expand a URI template and inherit from the base URL if it's relative
      *
-     * @param string|array $url URL or an array of the URI template to expand
-     *                          followed by a hash of template varnames.
+     * @param string|array $url URL or URI template to expand
+     *
      * @return string
-     * @throws \InvalidArgumentException
      */
     private function buildUrl($url)
     {
@@ -295,11 +305,6 @@ private function buildUrl($url)
                 : (string) $this->baseUrl->combine($url);
         }
 
-        if (!isset($url[1])) {
-            throw new \InvalidArgumentException('You must provide a hash of '
-                . 'varname options in the second element of a URL array.');
-        }
-
         // Absolute URL
         if (strpos($url[0], '://')) {
             return Utils::uriTemplate($url[0], $url[1]);
@@ -315,12 +320,7 @@ private function configureBaseUrl(&$config)
     {
         if (!isset($config['base_url'])) {
             $this->baseUrl = new Url('', '');
-        } elseif (!is_array($config['base_url'])) {
-            $this->baseUrl = Url::fromString($config['base_url']);
-        } elseif (count($config['base_url']) < 2) {
-            throw new \InvalidArgumentException('You must provide a hash of '
-                . 'varname options in the second element of a base_url array.');
-        } else {
+        } elseif (is_array($config['base_url'])) {
             $this->baseUrl = Url::fromString(
                 Utils::uriTemplate(
                     $config['base_url'][0],
@@ -328,6 +328,8 @@ private function configureBaseUrl(&$config)
                 )
             );
             $config['base_url'] = (string) $this->baseUrl;
+        } else {
+            $this->baseUrl = Url::fromString($config['base_url']);
         }
     }
 
@@ -354,42 +356,27 @@ private function configureDefaults($config)
     }
 
     /**
-     * Merges default options into the array passed by reference.
+     * Merges default options into the array passed by reference and returns
+     * an array of headers that need to be merged in after the request is
+     * created.
      *
      * @param array $options Options to modify by reference
      *
-     * @return array
+     * @return array|null
      */
-    private function mergeDefaults($options)
+    private function mergeDefaults(&$options)
     {
-        $defaults = $this->defaults;
-
-        // Case-insensitively merge in default headers if both defaults and
-        // options have headers specified.
-        if (!empty($defaults['headers']) && !empty($options['headers'])) {
-            // Create a set of lowercased keys that are present.
-            $lkeys = [];
-            foreach (array_keys($options['headers']) as $k) {
-                $lkeys[strtolower($k)] = true;
-            }
-            // Merge in lowercase default keys when not present in above set.
-            foreach ($defaults['headers'] as $key => $value) {
-                if (!isset($lkeys[strtolower($key)])) {
-                    $options['headers'][$key] = $value;
-                }
-            }
-            // No longer need to merge in headers.
-            unset($defaults['headers']);
+        // Merging optimization for when no headers are present
+        if (!isset($options['headers']) || !isset($this->defaults['headers'])) {
+            $options = array_replace_recursive($this->defaults, $options);
+            return null;
         }
 
-        $result = array_replace_recursive($defaults, $options);
-        foreach ($options as $k => $v) {
-            if ($v === null) {
-                unset($result[$k]);
-            }
-        }
+        $defaults = $this->defaults;
+        unset($defaults['headers']);
+        $options = array_replace_recursive($defaults, $options);
 
-        return $result;
+        return $this->defaults['headers'];
     }
 
     /**
@@ -398,6 +385,6 @@ private function mergeDefaults($options)
      */
     public function sendAll($requests, array $options = [])
     {
-        Pool::send($this, $requests, $options);
+        (new Pool($this, $requests, $options))->wait();
     }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/core/vendor/guzzlehttp/guzzle/src/ClientInterface.php
index fac8864..4f6ad26 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.2.0';
+    const VERSION = '5.0.3';
 
     /**
      * Create and return a new {@see RequestInterface} object.
diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php
index 8c8fbc9..53383f4 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRequestEvent.php
@@ -42,16 +42,6 @@ public function getRequest()
     }
 
     /**
-     * Get the number of transaction retries.
-     *
-     * @return int
-     */
-    public function getRetryCount()
-    {
-        return $this->transaction->retries;
-    }
-
-    /**
      * @return Transaction
      */
     protected function getTransaction()
diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRetryableEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRetryableEvent.php
index bbbdfaf..828d315 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRetryableEvent.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractRetryableEvent.php
@@ -27,9 +27,9 @@ class AbstractRetryableEvent extends AbstractTransferEvent
      */
     public function retry($afterDelay = 0)
     {
-        // Setting the transition state to 'retry' will cause the next state
-        // transition of the transaction to retry the request.
-        $this->transaction->state = 'retry';
+        $this->transaction->response = null;
+        $this->transaction->exception = null;
+        $this->transaction->state = 'before';
 
         if ($afterDelay) {
             $this->transaction->request->getConfig()->set('delay', $afterDelay);
diff --git a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
index 3b106df..9e4a90f 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Event/AbstractTransferEvent.php
@@ -20,13 +20,11 @@
      */
     public function getTransferInfo($name = null)
     {
-        if (!$name) {
-            return $this->transaction->transferInfo;
-        }
-
-        return isset($this->transaction->transferInfo[$name])
-            ? $this->transaction->transferInfo[$name]
-            : null;
+        return !$name
+            ? $this->transaction->transferInfo
+            : (isset($this->transaction->transferInfo[$name])
+                ? $this->transaction->transferInfo[$name]
+                : null);
     }
 
     /**
diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/AppliesHeadersInterface.php b/core/vendor/guzzlehttp/guzzle/src/Message/AppliesHeadersInterface.php
deleted file mode 100644
index ca42f20..0000000
--- a/core/vendor/guzzlehttp/guzzle/src/Message/AppliesHeadersInterface.php
+++ /dev/null
@@ -1,24 +0,0 @@
-<?php
-namespace GuzzleHttp\Message;
-
-/**
- * Applies headers to a request.
- *
- * This interface can be used with Guzzle streams to apply body specific
- * headers to a request during the PREPARE_REQUEST priority of the before event
- *
- * NOTE: a body that implements this interface will prevent a default
- * content-type from being added to a request during the before event. If you
- * want a default content-type to be added, then it will need to be done
- * manually (e.g., using {@see GuzzleHttp\Mimetypes}).
- */
-interface AppliesHeadersInterface
-{
-    /**
-     * Apply headers to a request appropriate for the current state of the
-     * object.
-     *
-     * @param RequestInterface $request Request
-     */
-    public function applyRequestHeaders(RequestInterface $request);
-}
diff --git a/core/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php b/core/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php
index 85984e2..5b52ad6 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php
@@ -40,10 +40,9 @@ class MessageFactory implements MessageFactoryInterface
 
     /** @var array Default allow_redirects request option settings  */
     private static $defaultRedirect = [
-        'max'       => 5,
-        'strict'    => false,
-        'referer'   => false,
-        'protocols' => ['http', 'https']
+        'max'     => 5,
+        'strict'  => false,
+        'referer' => false
     ];
 
     /**
@@ -199,8 +198,9 @@ protected function applyOptions(
 
                 if ($value === true) {
                     $value = self::$defaultRedirect;
-                } elseif (!is_array($value)) {
-                    throw new Iae('allow_redirects must be true, false, or array');
+                } elseif (!isset($value['max'])) {
+                    throw new Iae('allow_redirects must be true, false, or an '
+                        . 'array that contains the \'max\' key');
                 } else {
                     // Merge the default settings with the provided settings
                     $value += self::$defaultRedirect;
@@ -227,8 +227,12 @@ protected function applyOptions(
                 if (!is_array($value)) {
                     throw new Iae('header value must be an array');
                 }
+
+                // Do not overwrite existing headers
                 foreach ($value as $k => $v) {
-                    $request->setHeader($k, $v);
+                    if (!$request->hasHeader($k)) {
+                        $request->setHeader($k, $v);
+                    }
                 }
                 break;
 
diff --git a/core/vendor/guzzlehttp/guzzle/src/Pool.php b/core/vendor/guzzlehttp/guzzle/src/Pool.php
index 49d9940..e95ab09 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Pool.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Pool.php
@@ -1,7 +1,6 @@
 <?php
 namespace GuzzleHttp;
 
-use GuzzleHttp\Event\BeforeEvent;
 use GuzzleHttp\Event\RequestEvents;
 use GuzzleHttp\Message\RequestInterface;
 use GuzzleHttp\Message\ResponseInterface;
@@ -10,9 +9,7 @@
 use GuzzleHttp\Event\ListenerAttacherTrait;
 use GuzzleHttp\Event\EndEvent;
 use React\Promise\Deferred;
-use React\Promise\FulfilledPromise;
 use React\Promise\PromiseInterface;
-use React\Promise\RejectedPromise;
 
 /**
  * Sends and iterator of requests concurrently using a capped pool size.
@@ -53,9 +50,9 @@ class Pool implements FutureInterface
     private $isRealized = false;
 
     /**
-     * The option values for 'before', 'complete', 'error' and 'end' can be a
-     * callable, an associative array containing event data, or an array of
-     * event data arrays. Event data arrays contain the following keys:
+     * The option values for 'before', 'after', and 'error' can be a callable,
+     * an associative array containing event data, or an array of event data
+     * arrays. Event data arrays contain the following keys:
      *
      * - fn: callable to invoke that receives the event
      * - priority: Optional event priority (defaults to 0)
@@ -64,14 +61,10 @@ class Pool implements FutureInterface
      * @param ClientInterface $client   Client used to send the requests.
      * @param array|\Iterator $requests Requests to send in parallel
      * @param array           $options  Associative array of options
-     *     - pool_size: (callable|int)   Maximum number of requests to send
-     *                                   concurrently, or a callback that receives
-     *                                   the current queue size and returns the
-     *                                   number of new requests to send
+     *     - pool_size: (int) Maximum number of requests to send concurrently
      *     - before:    (callable|array) Receives a BeforeEvent
-     *     - complete:  (callable|array) Receives a CompleteEvent
+     *     - after:     (callable|array) Receives a CompleteEvent
      *     - error:     (callable|array) Receives a ErrorEvent
-     *     - end:       (callable|array) Receives an EndEvent
      */
     public function __construct(
         ClientInterface $client,
@@ -147,28 +140,7 @@ public static function send(
         $requests,
         array $options = []
     ) {
-        $pool = new self($client, $requests, $options);
-        $pool->wait();
-    }
-
-    private function getPoolSize()
-    {
-        return is_callable($this->poolSize)
-            ? call_user_func($this->poolSize, count($this->waitQueue))
-            : $this->poolSize;
-    }
-
-    /**
-     * Add as many requests as possible up to the current pool limit.
-     */
-    private function addNextRequests()
-    {
-        $limit = max($this->getPoolSize() - count($this->waitQueue), 0);
-        while ($limit--) {
-            if (!$this->addNextRequest()) {
-                break;
-            }
-        }
+        (new self($client, $requests, $options))->wait();
     }
 
     public function wait()
@@ -178,7 +150,11 @@ public function wait()
         }
 
         // Seed the pool with N number of requests.
-        $this->addNextRequests();
+        for ($i = 0; $i < $this->poolSize; $i++) {
+            if (!$this->addNextRequest()) {
+                break;
+            }
+        }
 
         // Stop if the pool was cancelled while transferring requests.
         if ($this->isRealized) {
@@ -192,7 +168,6 @@ public function wait()
             } catch (\Exception $e) {
                 // Eat exceptions because they should be handled asynchronously
             }
-            $this->addNextRequests();
         }
 
         // Clean up no longer needed state.
@@ -266,8 +241,6 @@ private function coerceIterable($requests)
      */
     private function addNextRequest()
     {
-        add_next:
-
         if ($this->isRealized || !$this->iter || !$this->iter->valid()) {
             return false;
         }
@@ -285,49 +258,23 @@ private function addNextRequest()
 
         // Be sure to use "lazy" futures, meaning they do not send right away.
         $request->getConfig()->set('future', 'lazy');
-        $hash = spl_object_hash($request);
         $this->attachListeners($request, $this->eventListeners);
-        $request->getEmitter()->on('before', [$this, '_trackRetries'], RequestEvents::EARLY);
         $response = $this->client->send($request);
+        $hash = spl_object_hash($request);
         $this->waitQueue[$hash] = $response;
-        $promise = $response->promise();
-
-        // Don't recursively call itself for completed or rejected responses.
-        if ($promise instanceof FulfilledPromise
-            || $promise instanceof RejectedPromise
-        ) {
-            try {
-                $this->finishResponse($request, $response->wait(), $hash);
-            } catch (\Exception $e) {
-                $this->finishResponse($request, $e, $hash);
-            }
-            goto add_next;
-        }
 
         // Use this function for both resolution and rejection.
-        $thenFn = function ($value) use ($request, $hash) {
-            $this->finishResponse($request, $value, $hash);
-            if (!$request->getConfig()->get('_pool_retries')) {
-                $this->addNextRequests();
-            }
+        $fn = function ($value) use ($request, $hash) {
+            unset($this->waitQueue[$hash]);
+            $result = $value instanceof ResponseInterface
+                ? ['request' => $request, 'response' => $value, 'error' => null]
+                : ['request' => $request, 'response' => null, 'error' => $value];
+            $this->deferred->progress($result);
+            $this->addNextRequest();
         };
 
-        $promise->then($thenFn, $thenFn);
+        $response->then($fn, $fn);
 
         return true;
     }
-
-    public function _trackRetries(BeforeEvent $e)
-    {
-        $e->getRequest()->getConfig()->set('_pool_retries', $e->getRetryCount());
-    }
-
-    private function finishResponse($request, $value, $hash)
-    {
-        unset($this->waitQueue[$hash]);
-        $result = $value instanceof ResponseInterface
-            ? ['request' => $request, 'response' => $value, 'error' => null]
-            : ['request' => $request, 'response' => null, 'error' => $value];
-        $this->deferred->progress($result);
-    }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/src/Post/PostBodyInterface.php b/core/vendor/guzzlehttp/guzzle/src/Post/PostBodyInterface.php
index c2ec9a6..81e4595 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Post/PostBodyInterface.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Post/PostBodyInterface.php
@@ -1,16 +1,23 @@
 <?php
 namespace GuzzleHttp\Post;
 
-use GuzzleHttp\Message\AppliesHeadersInterface;
+use GuzzleHttp\Message\RequestInterface;
 use GuzzleHttp\Stream\StreamInterface;
 
 /**
  * Represents a POST body that is sent as either a multipart/form-data stream
  * or application/x-www-urlencoded stream.
  */
-interface PostBodyInterface extends StreamInterface, \Countable, AppliesHeadersInterface
+interface PostBodyInterface extends StreamInterface, \Countable
 {
     /**
+     * Apply headers to the request appropriate for the current state of the object
+     *
+     * @param RequestInterface $request Request
+     */
+    public function applyRequestHeaders(RequestInterface $request);
+
+    /**
      * Set a specific field
      *
      * @param string       $name  Name of the field to set
diff --git a/core/vendor/guzzlehttp/guzzle/src/RequestFsm.php b/core/vendor/guzzlehttp/guzzle/src/RequestFsm.php
index b37c190..82043ac 100644
--- a/core/vendor/guzzlehttp/guzzle/src/RequestFsm.php
+++ b/core/vendor/guzzlehttp/guzzle/src/RequestFsm.php
@@ -20,6 +20,30 @@ class RequestFsm
     private $mf;
     private $maxTransitions;
 
+    private $states = [
+        // When a mock intercepts the emitted "before" event, then we
+        // transition to the "complete" intercept state.
+        'before'   => [
+            'success'    => 'send',
+            'intercept'  => 'complete',
+            'error'      => 'error'
+        ],
+        // The complete and error events are handled using the "then" of
+        // the RingPHP request, so we exit the FSM.
+        'send' => ['error' => 'error'],
+        'complete' => [
+            'success'    => 'end',
+            'intercept'  => 'before',
+            'error'      => 'error'
+        ],
+        'error' => [
+            'success'    => 'complete',
+            'intercept'  => 'before',
+            'error'      => 'end'
+        ],
+        'end' => []
+    ];
+
     public function __construct(
         callable $handler,
         MessageFactoryInterface $messageFactory,
@@ -35,119 +59,156 @@ public function __construct(
      * optionally supplied $finalState is entered.
      *
      * @param Transaction $trans      Transaction being transitioned.
+     * @param string      $finalState The state to stop on. If unspecified,
+     *                                runs until a terminal state is found.
      *
      * @throws \Exception if a terminal state throws an exception.
      */
-    public function __invoke(Transaction $trans)
+    public function __invoke(Transaction $trans, $finalState = null)
     {
-        $trans->_transitionCount = 0;
+        $trans->_transitionCount = 1;
 
         if (!$trans->state) {
             $trans->state = 'before';
         }
 
-        transition:
+        while ($trans->state !== $finalState) {
 
-        if (++$trans->_transitionCount > $this->maxTransitions) {
-            throw new StateException("Too many state transitions were "
-                . "encountered ({$trans->_transitionCount}). This likely "
-                . "means that a combination of event listeners are in an "
-                . "infinite loop.");
-        }
+            if (!isset($this->states[$trans->state])) {
+                throw new StateException("Invalid state: {$trans->state}");
+            } elseif (++$trans->_transitionCount > $this->maxTransitions) {
+                throw new StateException('Too many state transitions were '
+                    . 'encountered ({$trans->_transitionCount}). This likely '
+                    . 'means that a combination of event listeners are in an '
+                    . 'infinite loop.');
+            }
 
-        switch ($trans->state) {
-            case 'before': goto before;
-            case 'complete': goto complete;
-            case 'error': goto error;
-            case 'retry': goto retry;
-            case 'send': goto send;
-            case 'end': goto end;
-            default: throw new StateException("Invalid state: {$trans->state}");
-        }
+            $state = $this->states[$trans->state];
 
-        before: {
             try {
-                $trans->request->getEmitter()->emit('before', new BeforeEvent($trans));
-                $trans->state = 'send';
-                if ((bool) $trans->response) {
-                    $trans->state = 'complete';
+                /** @var callable $fn */
+                $fn = [$this, $trans->state];
+                if ($fn($trans)) {
+                    // Handles transitioning to the "intercept" state.
+                    if (isset($state['intercept'])) {
+                        $trans->state = $state['intercept'];
+                        continue;
+                    }
+                    throw new StateException('Invalid intercept state '
+                        . 'transition from ' . $trans->state);
                 }
-            } catch (\Exception $e) {
-                $trans->state = 'error';
-                $trans->exception = $e;
-            }
-            goto transition;
-        }
 
-        complete: {
-            try {
-                if ($trans->response instanceof FutureInterface) {
-                    // Futures will have their own end events emitted when
-                    // dereferenced.
-                    return;
+                if (isset($state['success'])) {
+                    // Transition to the success state
+                    $trans->state = $state['success'];
+                } else {
+                    // Break: this is a terminal state with no transition.
+                    break;
                 }
-                $trans->state = 'end';
-                $trans->response->setEffectiveUrl($trans->request->getUrl());
-                $trans->request->getEmitter()->emit('complete', new CompleteEvent($trans));
+
+            } catch (StateException $e) {
+                // State exceptions are thrown no matter what.
+                throw $e;
             } catch (\Exception $e) {
-                $trans->state = 'error';
                 $trans->exception = $e;
+                // Terminal error states throw the exception.
+                if (!isset($state['error'])) {
+                    throw $e;
+                }
+                // Transition to the error state.
+                $trans->state = $state['error'];
             }
-            goto transition;
         }
+    }
 
-        error: {
-            try {
-                // Convert non-request exception to a wrapped exception
-                $trans->exception = RequestException::wrapException(
-                    $trans->request, $trans->exception
-                );
-                $trans->state = 'end';
-                $trans->request->getEmitter()->emit('error', new ErrorEvent($trans));
-                // An intercepted request (not retried) transitions to complete
-                if (!$trans->exception && $trans->state !== 'retry') {
-                    $trans->state = 'complete';
-                }
-            } catch (\Exception $e) {
-                $trans->state = 'end';
-                $trans->exception = $e;
+    private function before(Transaction $trans)
+    {
+        $trans->request->getEmitter()->emit('before', new BeforeEvent($trans));
+
+        // When a response is set during the before event (i.e., a mock), then
+        // we don't need to send anything. Skip ahead to the complete event
+        // by returning to to go to the intercept state.
+        return (bool) $trans->response;
+    }
+
+    private function send(Transaction $trans)
+    {
+        $fn = $this->handler;
+        $trans->response = FutureResponse::proxy(
+            $fn(RingBridge::prepareRingRequest($trans)),
+            function ($value) use ($trans) {
+                RingBridge::completeRingResponse($trans, $value, $this->mf, $this);
+                return $trans->response;
             }
-            goto transition;
+        );
+    }
+
+    /**
+     * Emits the error event and ensures that the exception is set and is an
+     * instance of RequestException. If the error event is not intercepted,
+     * then the exception is thrown and we transition to the "end" event. This
+     * event also allows requests to be retried, and when retried, transitions
+     * to the "before" event. Otherwise, when no retries, and the exception is
+     * intercepted, transition to the "complete" event.
+     */
+    private function error(Transaction $trans)
+    {
+        // Convert non-request exception to a wrapped exception
+        if (!($trans->exception instanceof RequestException)) {
+            $trans->exception = RequestException::wrapException(
+                $trans->request, $trans->exception
+            );
         }
 
-        retry: {
-            $trans->retries++;
-            $trans->response = null;
-            $trans->exception = null;
-            $trans->state = 'before';
-            goto transition;
+        // Dispatch an event and allow interception
+        $event = new ErrorEvent($trans);
+        $trans->request->getEmitter()->emit('error', $event);
+
+        if ($trans->exception) {
+            throw $trans->exception;
         }
 
-        send: {
-            $fn = $this->handler;
-            $trans->response = FutureResponse::proxy(
-                $fn(RingBridge::prepareRingRequest($trans)),
-                function ($value) use ($trans) {
-                    RingBridge::completeRingResponse($trans, $value, $this->mf, $this);
-                    $this($trans);
-                    return $trans->response;
-                }
-            );
+        $trans->exception = null;
+
+        // Return true to transition to the 'before' state. False otherwise.
+        return $trans->state === 'before';
+    }
+
+    /**
+     * Emits a complete event, and if a request is marked for a retry during
+     * the complete event, then the "before" state is transitioned to.
+     */
+    private function complete(Transaction $trans)
+    {
+        // Futures will have their own end events emitted when dereferenced.
+        if ($trans->response instanceof FutureInterface) {
+            return false;
+        }
+
+        $trans->response->setEffectiveUrl($trans->request->getUrl());
+        $trans->request->getEmitter()->emit('complete', new CompleteEvent($trans));
+
+        // Return true to transition to the 'before' state. False otherwise.
+        return $trans->state === 'before';
+    }
+
+    /**
+     * Emits the "end" event and throws an exception if one is present.
+     */
+    private function end(Transaction $trans)
+    {
+        // Futures will have their own end events emitted when dereferenced,
+        // but still emit, even for futures, when an exception is present.
+        if (!$trans->exception && $trans->response instanceof FutureInterface) {
             return;
         }
 
-        end: {
-            $trans->request->getEmitter()->emit('end', new EndEvent($trans));
-            // Throw exceptions in the terminal event if the exception
-            // was not handled by an "end" event listener.
-            if ($trans->exception) {
-                if (!($trans->exception instanceof RequestException)) {
-                    $trans->exception = RequestException::wrapException(
-                        $trans->request, $trans->exception
-                    );
-                }
-                throw $trans->exception;
-            }
+        $trans->request->getEmitter()->emit('end', new EndEvent($trans));
+
+        // Throw exceptions in the terminal event if the exception was not
+        // handled by an "end" event listener.
+        if ($trans->exception) {
+            throw $trans->exception;
         }
     }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/src/RingBridge.php b/core/vendor/guzzlehttp/guzzle/src/RingBridge.php
index bc6841d..12e3c70 100644
--- a/core/vendor/guzzlehttp/guzzle/src/RingBridge.php
+++ b/core/vendor/guzzlehttp/guzzle/src/RingBridge.php
@@ -72,17 +72,19 @@ public static function prepareRingRequest(Transaction $trans)
 
     /**
      * Handles the process of processing a response received from a ring
-     * handler. The created response is added to the transaction, and the
-     * transaction stat is set appropriately.
+     * handler. The created response is added to the transaction, and any
+     * necessary events are emitted based on the ring response.
      *
      * @param Transaction             $trans          Owns request and response.
      * @param array                   $response       Ring response array
      * @param MessageFactoryInterface $messageFactory Creates response objects.
+     * @param callable                $fsm            Request FSM function.
      */
     public static function completeRingResponse(
         Transaction $trans,
         array $response,
-        MessageFactoryInterface $messageFactory
+        MessageFactoryInterface $messageFactory,
+        callable $fsm
     ) {
         $trans->state = 'complete';
         $trans->transferInfo = isset($response['transfer_stats'])
@@ -114,6 +116,9 @@ public static function completeRingResponse(
             $trans->state = 'error';
             $trans->exception = $response['error'];
         }
+
+        // Complete the lifecycle of the request.
+        $fsm($trans);
     }
 
     /**
@@ -158,7 +163,7 @@ public static function getNoRingResponseException(RequestInterface $request)
 Sending the request did not return a response, exception, or populate the
 transaction with a response. This is most likely due to an incorrectly
 implemented RingPHP handler. If you are simply trying to mock responses,
-then it is recommended to use the GuzzleHttp\Ring\Client\MockHandler.
+then it is recommneded to use the GuzzleHttp\Ring\Client\MockHandler.
 EOT;
         return new RequestException($message, $request);
     }
diff --git a/core/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php b/core/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php
index b5ed4e2..472f603 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Subscriber/Prepare.php
@@ -4,9 +4,9 @@
 use GuzzleHttp\Event\BeforeEvent;
 use GuzzleHttp\Event\RequestEvents;
 use GuzzleHttp\Event\SubscriberInterface;
-use GuzzleHttp\Message\AppliesHeadersInterface;
 use GuzzleHttp\Message\RequestInterface;
 use GuzzleHttp\Mimetypes;
+use GuzzleHttp\Post\PostBodyInterface;
 use GuzzleHttp\Stream\StreamInterface;
 
 /**
@@ -40,8 +40,8 @@ public function onBefore(BeforeEvent $event)
 
         $this->addContentLength($request, $body);
 
-        if ($body instanceof AppliesHeadersInterface) {
-            // Synchronize the body with the request headers
+        if ($body instanceof PostBodyInterface) {
+            // Synchronize the POST body with the request's headers
             $body->applyRequestHeaders($request);
         } elseif (!$request->hasHeader('Content-Type')) {
             $this->addContentType($request, $body);
diff --git a/core/vendor/guzzlehttp/guzzle/src/Subscriber/Redirect.php b/core/vendor/guzzlehttp/guzzle/src/Subscriber/Redirect.php
index ff99226..84f89d3 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Subscriber/Redirect.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Subscriber/Redirect.php
@@ -4,7 +4,6 @@
 use GuzzleHttp\Event\CompleteEvent;
 use GuzzleHttp\Event\RequestEvents;
 use GuzzleHttp\Event\SubscriberInterface;
-use GuzzleHttp\Exception\BadResponseException;
 use GuzzleHttp\Exception\CouldNotRewindStreamException;
 use GuzzleHttp\Exception\TooManyRedirectsException;
 use GuzzleHttp\Message\RequestInterface;
@@ -26,9 +25,6 @@
  *     POST request with a GET request).
  *   - referer: Set to true to automatically add the "Referer" header when a
  *     redirect request is sent.
- *   - protocols: Array of allowed protocols. Defaults to 'http' and 'https'.
- *     When a redirect attempts to utilize a protocol that is not white listed,
- *     an exception is thrown.
  */
 class Redirect implements SubscriberInterface
 {
@@ -103,7 +99,6 @@ private function modifyRedirectRequest(
         ResponseInterface $response
     ) {
         $config = $request->getConfig();
-        $protocols = $config->getPath('redirect/protocols') ?: ['http', 'https'];
 
         // Use a GET request if this is an entity enclosing request and we are
         // not forcing RFC compliance, but rather emulating what all browsers
@@ -117,7 +112,7 @@ private function modifyRedirectRequest(
         }
 
         $previousUrl = $request->getUrl();
-        $this->setRedirectUrl($request, $response, $protocols);
+        $this->setRedirectUrl($request, $response);
         $this->rewindEntityBody($request);
 
         // Add the Referer header if it is told to do so and only
@@ -139,12 +134,10 @@ private function modifyRedirectRequest(
      *
      * @param RequestInterface  $request
      * @param ResponseInterface $response
-     * @param array             $protocols
      */
     private function setRedirectUrl(
         RequestInterface $request,
-        ResponseInterface $response,
-        array $protocols
+        ResponseInterface $response
     ) {
         $location = $response->getHeader('Location');
         $location = Url::fromString($location);
@@ -158,19 +151,6 @@ private function setRedirectUrl(
             $location = $originalUrl->combine($location);
         }
 
-        // Ensure that the redirect URL is allowed based on the protocols.
-        if (!in_array($location->getScheme(), $protocols)) {
-            throw new BadResponseException(
-                sprintf(
-                    'Redirect URL, %s, does not use one of the allowed redirect protocols: %s',
-                    $location,
-                    implode(', ', $protocols)
-                ),
-                $request,
-                $response
-            );
-        }
-
         $request->setUrl($location);
     }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/src/Transaction.php b/core/vendor/guzzlehttp/guzzle/src/Transaction.php
index 30a3f94..6a982f4 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Transaction.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Transaction.php
@@ -56,48 +56,30 @@ class Transaction
     public $transferInfo = [];
 
     /**
-     * The number of transaction retries.
-     *
-     * @var int
-     */
-    public $retries = 0;
-
-    /**
-     * The transaction's current state.
+     * The transaction's state.
      *
      * @var string
      */
     public $state;
 
     /**
-     * Whether or not this is a future transaction. This value should not be
-     * changed after the future is constructed.
-     *
-     * @var bool
-     */
-    public $future;
-
-    /**
-     * The number of state transitions that this transaction has been through.
+     * The number of state transitions that this transactions has been through.
      *
      * @var int
      * @internal This is for internal use only. If you modify this, then you
      *           are asking for trouble.
      */
-    public $_transitionCount = 0;
+    public $_transitionCount;
 
     /**
      * @param ClientInterface  $client  Client that is used to send the requests
      * @param RequestInterface $request Request to send
-     * @param bool             $future  Whether or not this is a future request.
      */
     public function __construct(
         ClientInterface $client,
-        RequestInterface $request,
-        $future = false
+        RequestInterface $request
     ) {
         $this->client = $client;
         $this->request = $request;
-        $this->_future = $future;
     }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/src/Url.php b/core/vendor/guzzlehttp/guzzle/src/Url.php
index a81bad2..95ec433 100644
--- a/core/vendor/guzzlehttp/guzzle/src/Url.php
+++ b/core/vendor/guzzlehttp/guzzle/src/Url.php
@@ -135,7 +135,7 @@ public function __construct(
         $password = null,
         $port = null,
         $path = null,
-        $query = null,
+        Query $query = null,
         $fragment = null
     ) {
         $this->scheme = $scheme;
diff --git a/core/vendor/guzzlehttp/guzzle/tests/ClientTest.php b/core/vendor/guzzlehttp/guzzle/tests/ClientTest.php
index 913e535..48f1702 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/ClientTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/ClientTest.php
@@ -7,12 +7,10 @@
 use GuzzleHttp\Message\MessageFactory;
 use GuzzleHttp\Message\Response;
 use GuzzleHttp\Exception\RequestException;
-use GuzzleHttp\Query;
 use GuzzleHttp\Ring\Client\MockHandler;
 use GuzzleHttp\Ring\Future\FutureArray;
 use GuzzleHttp\Subscriber\History;
 use GuzzleHttp\Subscriber\Mock;
-use GuzzleHttp\Url;
 use React\Promise\Deferred;
 
 /**
@@ -73,14 +71,6 @@ public function testCanSpecifyBaseUrlUriTemplate()
     }
 
     /**
-     * @expectedException \InvalidArgumentException
-     */
-    public function testValidatesUriTemplateValue()
-    {
-        new Client(['base_url' => ['http://foo.com/']]);
-    }
-
-    /**
      * @expectedException \Exception
      * @expectedExceptionMessage Foo
      */
@@ -253,15 +243,6 @@ public function testClientMergesDefaultHeadersCaseInsensitively()
         $this->assertEquals('custom', $request->getHeader('Foo'));
     }
 
-    public function testCanOverrideDefaultOptionWithNull()
-    {
-        $client = new Client(['defaults' => ['proxy' => 'invalid!']]);
-        $request = $client->createRequest('GET', 'http://foo.com?a=b', [
-            'proxy' => null
-        ]);
-        $this->assertFalse($request->getConfig()->hasKey('proxy'));
-    }
-
     public function testDoesNotOverwriteExistingUA()
     {
         $client = new Client(['defaults' => [
@@ -291,15 +272,6 @@ public function testUsesBaseUrlCombinedWithProvidedUrl()
         );
     }
 
-    public function testFalsyPathsAreCombinedWithBaseUrl()
-    {
-        $client = new Client(['base_url' => 'http://www.foo.com/baz?bam=bar']);
-        $this->assertEquals(
-            'http://www.foo.com/0',
-            $client->createRequest('GET', '0')->getUrl()
-        );
-    }
-
     public function testUsesBaseUrlCombinedWithProvidedUrlViaUriTemplate()
     {
         $client = new Client(['base_url' => 'http://www.foo.com/baz?bam=bar']);
@@ -610,15 +582,4 @@ public function testReturnsFutureForResponseWhenRequested()
         $this->assertInstanceOf('GuzzleHttp\Message\FutureResponse', $res);
         $this->assertEquals(200, $res->getStatusCode());
     }
-
-    public function testCanUseUrlWithCustomQuery()
-    {
-        $client = new Client();
-        $url = Url::fromString('http://foo.com/bar');
-        $query = new Query(['baz' => '123%20']);
-        $query->setEncodingType(false);
-        $url->setQuery($query);
-        $r = $client->createRequest('GET', $url);
-        $this->assertEquals('http://foo.com/bar?baz=123%20', $r->getUrl());
-    }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractRetryableEventTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractRetryableEventTest.php
index 6a39d8b..dcc874c 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractRetryableEventTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractRetryableEventTest.php
@@ -19,7 +19,7 @@ public function testCanRetry()
             ->getMockForAbstractClass();
         $e->retry();
         $this->assertTrue($e->isPropagationStopped());
-        $this->assertEquals('retry', $t->state);
+        $this->assertEquals('before', $t->state);
     }
 
     public function testCanRetryAfterDelay()
@@ -31,7 +31,7 @@ public function testCanRetryAfterDelay()
             ->getMockForAbstractClass();
         $e->retry(10);
         $this->assertTrue($e->isPropagationStopped());
-        $this->assertEquals('retry', $t->state);
+        $this->assertEquals('before', $t->state);
         $this->assertEquals(10, $t->request->getConfig()->get('delay'));
     }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php
index 5313c8e..ca3b5ba 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/Event/AbstractTransferEventTest.php
@@ -46,14 +46,4 @@ public function testCanInterceptWithResponse()
         $this->assertSame($t->response, $e->getResponse());
         $this->assertTrue($e->isPropagationStopped());
     }
-
-    public function testReturnsNumberOfRetries()
-    {
-        $t = new Transaction(new Client(), new Request('GET', '/'));
-        $t->retries = 2;
-        $e = $this->getMockBuilder('GuzzleHttp\Event\AbstractTransferEvent')
-            ->setConstructorArgs([$t])
-            ->getMockForAbstractClass();
-        $this->assertEquals(2, $e->getRetryCount());
-    }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/tests/IntegrationTest.php b/core/vendor/guzzlehttp/guzzle/tests/IntegrationTest.php
index e26c64d..0e91ff9 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/IntegrationTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/IntegrationTest.php
@@ -3,10 +3,7 @@
 
 use GuzzleHttp\Client;
 use GuzzleHttp\Event\AbstractTransferEvent;
-use GuzzleHttp\Event\CompleteEvent;
 use GuzzleHttp\Event\EndEvent;
-use GuzzleHttp\Event\ErrorEvent;
-use GuzzleHttp\Exception\RequestException;
 use GuzzleHttp\Message\Response;
 use GuzzleHttp\Pool;
 
@@ -73,51 +70,4 @@ public function testProperyGetsTransferStats()
         $this->assertNotEmpty($transfer);
         $this->assertArrayHasKey('url', $transfer);
     }
-
-    public function testNestedFutureResponsesAreResolvedWhenSending()
-    {
-        $c = new Client();
-        $total = 3;
-        Server::enqueue([
-            new Response(200),
-            new Response(201),
-            new Response(202)
-        ]);
-        $c->getEmitter()->on(
-            'complete',
-            function (CompleteEvent $e) use (&$total) {
-                if (--$total) {
-                    $e->retry();
-                }
-            }
-        );
-        $response = $c->get(Server::$url);
-        $this->assertEquals(202, $response->getStatusCode());
-        $this->assertEquals('GuzzleHttp\Message\Response', get_class($response));
-    }
-
-    public function testNestedFutureErrorsAreResolvedWhenSending()
-    {
-        $c = new Client();
-        $total = 3;
-        Server::enqueue([
-            new Response(500),
-            new Response(501),
-            new Response(502)
-        ]);
-        $c->getEmitter()->on(
-            'error',
-            function (ErrorEvent $e) use (&$total) {
-                if (--$total) {
-                    $e->retry();
-                }
-            }
-        );
-        try {
-            $c->get(Server::$url);
-            $this->fail('Did not throw!');
-        } catch (RequestException $e) {
-            $this->assertEquals(502, $e->getResponse()->getStatusCode());
-        }
-    }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php b/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php
index aa2e45e..3e1fd3d 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/Message/MessageFactoryTest.php
@@ -144,7 +144,7 @@ public function testCanDisableRedirects()
      */
     public function testValidatesRedirects()
     {
-        (new MessageFactory())->createRequest('GET', '/', ['allow_redirects' => 'foo']);
+        (new MessageFactory())->createRequest('GET', '/', ['allow_redirects' => []]);
     }
 
     public function testCanEnableStrictRedirectsAndSpecifyMax()
diff --git a/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php b/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php
index b5f02ad..788a0f8 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/PoolTest.php
@@ -154,64 +154,6 @@ public function testBatchesRequests()
         $this->assertSame($responses[3], $result[2]->getResponse());
     }
 
-    public function testBatchesRequestsWithDynamicPoolSize()
-    {
-        $client = new Client(['handler' => function () {
-            throw new \RuntimeException('No network access');
-        }]);
-
-        $responses = [
-            new Response(301, ['Location' => 'http://foo.com/bar']),
-            new Response(200),
-            new Response(200),
-            new Response(404)
-        ];
-
-        $client->getEmitter()->attach(new Mock($responses));
-        $requests = [
-            $client->createRequest('GET', 'http://foo.com/baz'),
-            $client->createRequest('HEAD', 'http://httpbin.org/get'),
-            $client->createRequest('PUT', 'http://httpbin.org/put'),
-        ];
-
-        $a = $b = $c = $d = 0;
-        $result = Pool::batch($client, $requests, [
-            'before'    => function (BeforeEvent $e) use (&$a) { $a++; },
-            'complete'  => function (CompleteEvent $e) use (&$b) { $b++; },
-            'error'     => function (ErrorEvent $e) use (&$c) { $c++; },
-            'end'       => function (EndEvent $e) use (&$d) { $d++; },
-            'pool_size' => function ($queueSize) {
-                static $options = [1, 2, 1];
-                static $queued  = 0;
-
-                $this->assertEquals(
-                    $queued,
-                    $queueSize,
-                    'The number of queued requests should be equal to the sum of pool sizes so far.'
-                );
-
-                $next    = array_shift($options);
-                $queued += $next;
-
-                return $next;
-            }
-        ]);
-
-        $this->assertEquals(4, $a);
-        $this->assertEquals(2, $b);
-        $this->assertEquals(1, $c);
-        $this->assertEquals(3, $d);
-        $this->assertCount(3, $result);
-        $this->assertInstanceOf('GuzzleHttp\BatchResults', $result);
-
-        // The first result is actually the second (redirect) response.
-        $this->assertSame($responses[1], $result[0]);
-        // The second result is a 1:1 request:response map
-        $this->assertSame($responses[2], $result[1]);
-        // The third entry is the 404 RequestException
-        $this->assertSame($responses[3], $result[2]->getResponse());
-    }
-
     /**
      * @expectedException \InvalidArgumentException
      * @expectedExceptionMessage Each event listener must be a callable or
@@ -286,34 +228,4 @@ public function testHasSendMethod()
         Pool::send($client, $requests);
         $this->assertCount(1, $history);
     }
-
-    public function testDoesNotInfinitelyRecurse()
-    {
-        $client = new Client(['handler' => function () {
-            throw new \RuntimeException('No network access');
-        }]);
-
-        $last = null;
-        $client->getEmitter()->on(
-            'before',
-            function (BeforeEvent $e) use (&$last) {
-                $e->intercept(new Response(200));
-                if (function_exists('xdebug_get_stack_depth')) {
-                    if ($last) {
-                        $this->assertEquals($last, xdebug_get_stack_depth());
-                    } else {
-                        $last = xdebug_get_stack_depth();
-                    }
-                }
-            }
-        );
-
-        $requests = [];
-        for ($i = 0; $i < 100; $i++) {
-            $requests[] = $client->createRequest('GET', 'http://foo.com');
-        }
-
-        $pool = new Pool($client, $requests);
-        $pool->wait();
-    }
 }
diff --git a/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php b/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php
index 0283a5e..308f5e0 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/Post/PostBodyTest.php
@@ -130,6 +130,7 @@ public function testConvertsFieldsToQueryStyleBody()
         $b->seek(0);
         $this->assertEquals('foo=bar&baz=123', $b->read(1000));
         $this->assertEquals(15, $b->tell());
+        $this->assertTrue($b->eof());
     }
 
     public function testCanSpecifyQueryAggregator()
diff --git a/core/vendor/guzzlehttp/guzzle/tests/RequestFsmTest.php b/core/vendor/guzzlehttp/guzzle/tests/RequestFsmTest.php
index dd67684..86dc270 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/RequestFsmTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/RequestFsmTest.php
@@ -5,7 +5,6 @@
 use GuzzleHttp\Message\MessageFactory;
 use GuzzleHttp\Message\Response;
 use GuzzleHttp\RequestFsm;
-use GuzzleHttp\Ring\Future\CompletedFutureArray;
 use GuzzleHttp\Subscriber\Mock;
 use GuzzleHttp\Transaction;
 use GuzzleHttp\Client;
@@ -30,23 +29,19 @@ public function setup()
 
     public function testEmitsBeforeEventInTransition()
     {
-        $fsm = new RequestFsm(function () {
-            return new CompletedFutureArray(['status' => 200]);
-        }, $this->mf);
+        $fsm = new RequestFsm(function () {}, $this->mf);
         $t = new Transaction(new Client(), new Request('GET', 'http://foo.com'));
         $c = false;
         $t->request->getEmitter()->on('before', function (BeforeEvent $e) use (&$c) {
             $c = true;
         });
-        $fsm($t);
+        $fsm($t, 'send');
         $this->assertTrue($c);
     }
 
     public function testEmitsCompleteEventInTransition()
     {
-        $fsm = new RequestFsm(function () {
-            return new CompletedFutureArray(['status' => 200]);
-        }, $this->mf);
+        $fsm = new RequestFsm(function () {}, $this->mf);
         $t = new Transaction(new Client(), new Request('GET', 'http://foo.com'));
         $t->response = new Response(200);
         $t->state = 'complete';
@@ -54,15 +49,13 @@ public function testEmitsCompleteEventInTransition()
         $t->request->getEmitter()->on('complete', function (CompleteEvent $e) use (&$c) {
             $c = true;
         });
-        $fsm($t);
+        $fsm($t, 'end');
         $this->assertTrue($c);
     }
 
     public function testDoesNotEmitCompleteForFuture()
     {
-        $fsm = new RequestFsm(function () {
-            return new CompletedFutureArray(['status' => 200]);
-        }, $this->mf);
+        $fsm = new RequestFsm(function () {}, $this->mf);
         $t = new Transaction(new Client(), new Request('GET', 'http://foo.com'));
         $deferred = new Deferred();
         $t->response = new FutureResponse($deferred->promise());
@@ -71,6 +64,21 @@ public function testDoesNotEmitCompleteForFuture()
         $t->request->getEmitter()->on('complete', function (CompleteEvent $e) use (&$c) {
             $c = true;
         });
+        $fsm($t, 'end');
+        $this->assertFalse($c);
+    }
+
+    public function testDoesNotEmitEndForFuture()
+    {
+        $fsm = new RequestFsm(function () {}, $this->mf);
+        $t = new Transaction(new Client(), new Request('GET', 'http://foo.com'));
+        $deferred = new Deferred();
+        $t->response = new FutureResponse($deferred->promise());
+        $t->state = 'end';
+        $c = false;
+        $t->request->getEmitter()->on('end', function (EndEvent $e) use (&$c) {
+            $c = true;
+        });
         $fsm($t);
         $this->assertFalse($c);
     }
@@ -87,9 +95,7 @@ public function testTransitionsThroughSuccessfulTransfer()
 
     public function testTransitionsThroughErrorsInBefore()
     {
-        $fsm = new RequestFsm(function () {
-            return new CompletedFutureArray(['status' => 200]);
-        }, $this->mf);
+        $fsm = new RequestFsm(function () {}, $this->mf);
         $client = new Client();
         $request = $client->createRequest('GET', 'http://ewfewwef.com');
         $t = new Transaction($client, $request);
@@ -99,7 +105,7 @@ public function testTransitionsThroughErrorsInBefore()
             throw new \Exception('foo');
         });
         try {
-            $fsm($t);
+            $fsm($t, 'send');
             $this->fail('did not throw');
         } catch (RequestException $e) {
             $this->assertContains('foo', $t->exception->getMessage());
@@ -127,9 +133,7 @@ public function testTransitionsThroughErrorsInComplete()
 
     public function testTransitionsThroughErrorInterception()
     {
-        $fsm = new RequestFsm(function () {
-            return new CompletedFutureArray(['status' => 404]);
-        }, $this->mf);
+        $fsm = new RequestFsm(function () {}, $this->mf);
         $client = new Client();
         $request = $client->createRequest('GET', 'http://ewfewwef.com');
         $t = new Transaction($client, $request);
@@ -138,6 +142,9 @@ public function testTransitionsThroughErrorInterception()
         $t->request->getEmitter()->on('error', function (ErrorEvent $e) {
             $e->intercept(new Response(200));
         });
+        $fsm($t, 'send');
+        $t->response = new Response(404);
+        $t->state = 'complete';
         $fsm($t);
         $this->assertEquals(200, $t->response->getStatusCode());
         $this->assertNull($t->exception);
@@ -168,12 +175,10 @@ public function testDetectsInfiniteLoops()
     {
         $client = new Client([
             'fsm' => $fsm = new RequestFsm(
-                function () {
-                    return new CompletedFutureArray(['status' => 200]);
-                },
-                new MessageFactory(),
-                3
-            )
+                    function () {},
+                    new MessageFactory(),
+                    3
+                )
         ]);
         $request = $client->createRequest('GET', 'http://foo.com:123');
         $request->getEmitter()->on('before', function () {
diff --git a/core/vendor/guzzlehttp/guzzle/tests/RingBridgeTest.php b/core/vendor/guzzlehttp/guzzle/tests/RingBridgeTest.php
index dc26a42..19af077 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/RingBridgeTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/RingBridgeTest.php
@@ -107,6 +107,24 @@ public function testGetsStreamFromResponse()
         $this->assertEquals('foo', (string) $response->getBody());
     }
 
+    public function testEmitsCompleteEventOnSuccess()
+    {
+        $c = false;
+        $trans = new Transaction(new Client(), new Request('GET', 'http://f.co'));
+        $trans->request->getEmitter()->on('complete', function () use (&$c) {
+            $c = true;
+        });
+        $f = new MessageFactory();
+        $res = ['status' => 200, 'headers' => []];
+        $fsm = new RequestFsm(function () {}, new MessageFactory());
+        RingBridge::completeRingResponse($trans, $res, $f, $fsm);
+        $this->assertInstanceOf(
+            'GuzzleHttp\Message\ResponseInterface',
+            $trans->response
+        );
+        $this->assertTrue($c);
+    }
+
     public function testEmitsErrorEventOnError()
     {
         $client = new Client(['base_url' => 'http://127.0.0.1:123']);
diff --git a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/RedirectTest.php b/core/vendor/guzzlehttp/guzzle/tests/Subscriber/RedirectTest.php
index 293cfc2..168b605 100644
--- a/core/vendor/guzzlehttp/guzzle/tests/Subscriber/RedirectTest.php
+++ b/core/vendor/guzzlehttp/guzzle/tests/Subscriber/RedirectTest.php
@@ -266,23 +266,4 @@ public function testRelativeLinkBasedLatestRequest()
             $response->getEffectiveUrl()
         );
     }
-
-    /**
-     * @expectedException \GuzzleHttp\Exception\BadResponseException
-     * @expectedExceptionMessage Redirect URL, https://foo.com/redirect2, does not use one of the allowed redirect protocols: http
-     */
-    public function testThrowsWhenRedirectingToInvalidUrlProtocol()
-    {
-        $mock = new Mock([
-            "HTTP/1.1 301 Moved Permanently\r\nLocation: /redirect1\r\nContent-Length: 0\r\n\r\n",
-            "HTTP/1.1 301 Moved Permanently\r\nLocation: https://foo.com/redirect2\r\nContent-Length: 0\r\n\r\n"
-        ]);
-        $client = new Client();
-        $client->getEmitter()->attach($mock);
-        $client->get('http://www.example.com/foo', [
-            'allow_redirects' => [
-                'protocols' => ['http']
-            ]
-        ]);
-    }
 }
diff --git a/core/vendor/guzzlehttp/ringphp/.travis.yml b/core/vendor/guzzlehttp/ringphp/.travis.yml
index e43fbdd..0befb17 100644
--- a/core/vendor/guzzlehttp/ringphp/.travis.yml
+++ b/core/vendor/guzzlehttp/ringphp/.travis.yml
@@ -4,7 +4,6 @@ php:
   - 5.4
   - 5.5
   - 5.6
-  - 7.0
   - hhvm
 
 before_script:
diff --git a/core/vendor/guzzlehttp/ringphp/CHANGELOG.md b/core/vendor/guzzlehttp/ringphp/CHANGELOG.md
index 97458da..ee3ce79 100644
--- a/core/vendor/guzzlehttp/ringphp/CHANGELOG.md
+++ b/core/vendor/guzzlehttp/ringphp/CHANGELOG.md
@@ -1,27 +1,5 @@
 # CHANGELOG
 
-## 1.0.7 - 2015-03-29
-
-* PHP 7 fixes.
-
-## 1.0.6 - 2015-02-26
-
-* Bug fix: futures now extend from React's PromiseInterface to ensure that they
-  are properly forwarded down the promise chain.
-* The multi handle of the CurlMultiHandler is now created lazily.
-
-## 1.0.5 - 2014-12-10
-
-* Adding more error information to PHP stream wrapper exceptions.
-* Added digest auth integration test support to test server.
-
-## 1.0.4 - 2014-12-01
-
-* Added support for older versions of cURL that do not have CURLOPT_TIMEOUT_MS.
-* Setting debug to `false` does not enable debug output.
-* Added a fix to the StreamHandler to return a `FutureArrayInterface` when an
-  error occurs.
-
 ## 1.0.3 - 2014-11-03
 
 * Setting the `header` stream option as a string to be compatible with GAE.
diff --git a/core/vendor/guzzlehttp/ringphp/composer.json b/core/vendor/guzzlehttp/ringphp/composer.json
index fcca629..2d8849f 100644
--- a/core/vendor/guzzlehttp/ringphp/composer.json
+++ b/core/vendor/guzzlehttp/ringphp/composer.json
@@ -1,6 +1,5 @@
 {
     "name": "guzzlehttp/ringphp",
-    "description": "Provides a simple API and specification that abstracts away the details of HTTP into a single PHP function.",
     "license": "MIT",
     "authors": [
         {
diff --git a/core/vendor/guzzlehttp/ringphp/docs/index.rst b/core/vendor/guzzlehttp/ringphp/docs/index.rst
index 4bbce63..3ac5447 100644
--- a/core/vendor/guzzlehttp/ringphp/docs/index.rst
+++ b/core/vendor/guzzlehttp/ringphp/docs/index.rst
@@ -15,11 +15,11 @@ without tying your application to a specific implementation.
 .. toctree::
    :maxdepth: 2
 
-   spec
-   futures
-   client_middleware
-   client_handlers
-   testing
+    spec
+    futures
+    client_middleware
+    client_handlers
+    testing
 
 .. code-block:: php
 
diff --git a/core/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php b/core/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php
index 0377ec2..f535a3d 100644
--- a/core/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php
+++ b/core/vendor/guzzlehttp/ringphp/src/Client/CurlFactory.php
@@ -406,20 +406,12 @@ function ($ch, $write) use ($value) {
 
             case 'timeout':
 
-                if (defined('CURLOPT_TIMEOUT_MS')) {
-                    $options[CURLOPT_TIMEOUT_MS] = $value * 1000;
-                } else {
-                    $options[CURLOPT_TIMEOUT] = $value;
-                }
+                $options[CURLOPT_TIMEOUT_MS] = $value * 1000;
                 break;
 
             case 'connect_timeout':
 
-                if (defined('CURLOPT_CONNECTTIMEOUT_MS')) {
-                    $options[CURLOPT_CONNECTTIMEOUT_MS] = $value * 1000;
-                } else {
-                    $options[CURLOPT_CONNECTTIMEOUT] = $value;
-                }
+                $options[CURLOPT_CONNECTTIMEOUT_MS] = $value * 1000;
                 break;
 
             case 'proxy':
diff --git a/core/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php b/core/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php
index d8215c5..d0323d8 100644
--- a/core/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php
+++ b/core/vendor/guzzlehttp/ringphp/src/Client/CurlHandler.php
@@ -71,7 +71,6 @@ public function __invoke(array $request)
         $response = ['transfer_stats' => curl_getinfo($h)];
         $response['curl']['error'] = curl_error($h);
         $response['curl']['errno'] = curl_errno($h);
-        $response['transfer_stats'] = array_merge($response['transfer_stats'], $response['curl']);
         $this->releaseEasyHandle($h);
 
         return new CompletedFutureArray(
diff --git a/core/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php b/core/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php
index b45f6c3..8335aac 100644
--- a/core/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php
+++ b/core/vendor/guzzlehttp/ringphp/src/Client/CurlMultiHandler.php
@@ -13,14 +13,13 @@
  * When using the CurlMultiHandler, custom curl options can be specified as an
  * associative array of curl option constants mapping to values in the
  * **curl** key of the "client" key of the request.
- *
- * @property resource $_mh Internal use only. Lazy loaded multi-handle.
  */
 class CurlMultiHandler
 {
     /** @var callable */
     private $factory;
     private $selectTimeout;
+    private $mh;
     private $active;
     private $handles = [];
     private $delays = [];
@@ -43,9 +42,8 @@ class CurlMultiHandler
      */
     public function __construct(array $options = [])
     {
-        if (isset($options['mh'])) {
-            $this->_mh = $options['mh'];
-        }
+        $this->mh = isset($options['mh'])
+            ? $options['mh'] : curl_multi_init();
         $this->factory = isset($options['handle_factory'])
             ? $options['handle_factory'] : new CurlFactory();
         $this->selectTimeout = isset($options['select_timeout'])
@@ -54,15 +52,6 @@ public function __construct(array $options = [])
             ? $options['max_handles'] : 100;
     }
 
-    public function __get($name)
-    {
-        if ($name === '_mh') {
-            return $this->_mh = curl_multi_init();
-        }
-
-        throw new \BadMethodCallException();
-    }
-
     public function __destruct()
     {
         // Finish any open connections before terminating the script.
@@ -70,9 +59,9 @@ public function __destruct()
             $this->execute();
         }
 
-        if (isset($this->_mh)) {
-            curl_multi_close($this->_mh);
-            unset($this->_mh);
+        if ($this->mh) {
+            curl_multi_close($this->mh);
+            $this->mh = null;
         }
     }
 
@@ -117,7 +106,7 @@ public function execute()
         do {
 
             if ($this->active &&
-                curl_multi_select($this->_mh, $this->selectTimeout) === -1
+                curl_multi_select($this->mh, $this->selectTimeout) === -1
             ) {
                 // Perform a usleep if a select returns -1.
                 // See: https://bugs.php.net/bug.php?id=61141
@@ -130,7 +119,7 @@ public function execute()
             }
 
             do {
-                $mrc = curl_multi_exec($this->_mh, $this->active);
+                $mrc = curl_multi_exec($this->mh, $this->active);
             } while ($mrc === CURLM_CALL_MULTI_PERFORM);
 
             $this->processMessages();
@@ -153,13 +142,13 @@ private function addRequest(array &$entry)
         if (isset($entry['request']['client']['delay'])) {
             $this->delays[$id] = microtime(true) + ($entry['request']['client']['delay'] / 1000);
         } elseif (empty($entry['request']['future'])) {
-            curl_multi_add_handle($this->_mh, $entry['handle']);
+            curl_multi_add_handle($this->mh, $entry['handle']);
         } else {
-            curl_multi_add_handle($this->_mh, $entry['handle']);
+            curl_multi_add_handle($this->mh, $entry['handle']);
             // "lazy" futures are only sent once the pool has many requests.
             if ($entry['request']['future'] !== 'lazy') {
                 do {
-                    $mrc = curl_multi_exec($this->_mh, $this->active);
+                    $mrc = curl_multi_exec($this->mh, $this->active);
                 } while ($mrc === CURLM_CALL_MULTI_PERFORM);
                 $this->processMessages();
             }
@@ -170,7 +159,7 @@ private function removeProcessed($id)
     {
         if (isset($this->handles[$id])) {
             curl_multi_remove_handle(
-                $this->_mh,
+                $this->mh,
                 $this->handles[$id]['handle']
             );
             curl_close($this->handles[$id]['handle']);
@@ -194,7 +183,7 @@ private function cancel($id)
 
         $handle = $this->handles[$id]['handle'];
         unset($this->delays[$id], $this->handles[$id]);
-        curl_multi_remove_handle($this->_mh, $handle);
+        curl_multi_remove_handle($this->mh, $handle);
         curl_close($handle);
 
         return true;
@@ -208,7 +197,7 @@ private function addDelays()
             if ($currentTime >= $delay) {
                 unset($this->delays[$id]);
                 curl_multi_add_handle(
-                    $this->_mh,
+                    $this->mh,
                     $this->handles[$id]['handle']
                 );
             }
@@ -217,7 +206,7 @@ private function addDelays()
 
     private function processMessages()
     {
-        while ($done = curl_multi_info_read($this->_mh)) {
+        while ($done = curl_multi_info_read($this->mh)) {
             $id = (int) $done['handle'];
 
             if (!isset($this->handles[$id])) {
diff --git a/core/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php b/core/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
index 855aad7..3a18ec6 100644
--- a/core/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
+++ b/core/vendor/guzzlehttp/ringphp/src/Client/StreamHandler.php
@@ -16,7 +16,6 @@
 class StreamHandler
 {
     private $options;
-    private $lastHeaders;
 
     public function __construct(array $options = [])
     {
@@ -31,17 +30,15 @@ public function __invoke(array $request)
         try {
             // Does not support the expect header.
             $request = Core::removeHeader($request, 'Expect');
-            $stream = $this->createStream($url, $request);
-            return $this->createResponse($request, $url, $stream);
+            $stream = $this->createStream($url, $request, $headers);
+            return $this->createResponse($request, $url, $headers, $stream);
         } catch (RingException $e) {
             return $this->createErrorResponse($url, $e);
         }
     }
 
-    private function createResponse(array $request, $url, $stream)
+    private function createResponse(array $request, $url, array $hdrs, $stream)
     {
-        $hdrs = $this->lastHeaders;
-        $this->lastHeaders = null;
         $parts = explode(' ', array_shift($hdrs), 3);
         $response = [
             'status'         => $parts[1],
@@ -134,13 +131,13 @@ private function createErrorResponse($url, RingException $e)
             $e = new ConnectException($e->getMessage(), 0, $e);
         }
 
-        return new CompletedFutureArray([
+        return [
             'status'        => null,
             'body'          => null,
             'headers'       => [],
             'effective_url' => $url,
             'error'         => $e
-        ]);
+        ];
     }
 
     /**
@@ -153,25 +150,17 @@ private function createErrorResponse($url, RingException $e)
      */
     private function createResource(callable $callback)
     {
-        $errors = null;
-        set_error_handler(function ($_, $msg, $file, $line) use (&$errors) {
-            $errors[] = [
-                'message' => $msg,
-                'file'    => $file,
-                'line'    => $line
-            ];
-            return true;
-        });
-
-        $resource = $callback();
-        restore_error_handler();
-
-        if (!$resource) {
+        // Turn off error reporting while we try to initiate the request
+        $level = error_reporting(0);
+        $resource = call_user_func($callback);
+        error_reporting($level);
+
+        // If the resource could not be created, then grab the last error and
+        // throw an exception.
+        if (!is_resource($resource)) {
             $message = 'Error creating resource: ';
-            foreach ($errors as $err) {
-                foreach ($err as $key => $value) {
-                    $message .= "[$key] $value" . PHP_EOL;
-                }
+            foreach ((array) error_get_last() as $key => $value) {
+                $message .= "[{$key}] {$value} ";
             }
             throw new RingException(trim($message));
         }
@@ -179,8 +168,11 @@ private function createResource(callable $callback)
         return $resource;
     }
 
-    private function createStream($url, array $request)
-    {
+    private function createStream(
+        $url,
+        array $request,
+        &$http_response_header
+    ) {
         static $methods;
         if (!$methods) {
             $methods = array_flip(get_class_methods(__CLASS__));
@@ -215,7 +207,8 @@ private function createStream($url, array $request)
             $url,
             $request,
             $options,
-            $this->createContext($request, $options, $params)
+            $this->createContext($request, $options, $params),
+            $http_response_header
         );
     }
 
@@ -309,7 +302,7 @@ private function add_cert(array $request, &$options, $value, &$params)
 
     private function add_progress(array $request, &$options, $value, &$params)
     {
-        $fn = function ($code, $_1, $_2, $_3, $transferred, $total) use ($value) {
+        $fn = function ($code, $_, $_, $_, $transferred, $total) use ($value) {
             if ($code == STREAM_NOTIFY_PROGRESS) {
                 $value($total, $transferred, null, null);
             }
@@ -323,10 +316,6 @@ private function add_progress(array $request, &$options, $value, &$params)
 
     private function add_debug(array $request, &$options, $value, &$params)
     {
-        if ($value === false) {
-            return;
-        }
-
         static $map = [
             STREAM_NOTIFY_CONNECT       => 'CONNECT',
             STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED',
@@ -393,17 +382,16 @@ private function createStreamResource(
         $url,
         array $request,
         array $options,
-        $context
+        $context,
+        &$http_response_header
     ) {
         return $this->createResource(
-            function () use ($url, $context) {
+            function () use ($url, &$http_response_header, $context) {
                 if (false === strpos($url, 'http')) {
                     trigger_error("URL is invalid: {$url}", E_USER_WARNING);
                     return null;
                 }
-                $resource = fopen($url, 'r', null, $context);
-                $this->lastHeaders = $http_response_header;
-                return $resource;
+                return fopen($url, 'r', null, $context);
             },
             $request,
             $options
diff --git a/core/vendor/guzzlehttp/ringphp/src/Future/FutureInterface.php b/core/vendor/guzzlehttp/ringphp/src/Future/FutureInterface.php
index 43d1811..902e776 100644
--- a/core/vendor/guzzlehttp/ringphp/src/Future/FutureInterface.php
+++ b/core/vendor/guzzlehttp/ringphp/src/Future/FutureInterface.php
@@ -16,7 +16,7 @@
  * computation has not yet completed when wait() is called, the call to wait()
  * will block until the future has completed.
  */
-interface FutureInterface extends PromiseInterface, PromisorInterface
+interface FutureInterface extends PromisorInterface
 {
     /**
      * Returns the result of the future either from cache or by blocking until
@@ -37,4 +37,20 @@ public function wait();
      * Cancels the future, if possible.
      */
     public function cancel();
+
+    /**
+     * Create and return a promise that invokes the given methods when the
+     * future has a value, exception, or progress events.
+     *
+     * @param callable $onFulfilled Called when the promise is resolved.
+     * @param callable $onRejected  Called when the promise is rejected.
+     * @param callable $onProgress  Called on progress events.
+     *
+     * @return PromiseInterface
+     */
+    public function then(
+        callable $onFulfilled = null,
+        callable $onRejected = null,
+        callable $onProgress = null
+    );
 }
diff --git a/core/vendor/guzzlehttp/ringphp/tests/Client/StreamHandlerTest.php b/core/vendor/guzzlehttp/ringphp/tests/Client/StreamHandlerTest.php
index 7549a83..8f63e29 100644
--- a/core/vendor/guzzlehttp/ringphp/tests/Client/StreamHandlerTest.php
+++ b/core/vendor/guzzlehttp/ringphp/tests/Client/StreamHandlerTest.php
@@ -41,10 +41,7 @@ public function testAddsErrorToResponse()
             'headers'     => ['host' => ['localhost:123']],
             'client'      => ['timeout' => 0.01],
         ]);
-        $this->assertInstanceOf(
-            'GuzzleHttp\Ring\Future\CompletedFutureArray',
-            $result
-        );
+
         $this->assertNull($result['status']);
         $this->assertNull($result['body']);
         $this->assertEquals([], $result['headers']);
diff --git a/core/vendor/guzzlehttp/ringphp/tests/Client/server.js b/core/vendor/guzzlehttp/ringphp/tests/Client/server.js
index 6a03e33..5642c0f 100644
--- a/core/vendor/guzzlehttp/ringphp/tests/Client/server.js
+++ b/core/vendor/guzzlehttp/ringphp/tests/Client/server.js
@@ -21,15 +21,6 @@
  *      <
  *      < [{'http_method': 'GET', 'uri': '/', 'headers': {}, 'body': 'string'}]
  *
- *  - Attempt access to the secure area
- *      > GET /secure/by-digest/qop-auth/guzzle-server/requests
- *      > Host: 127.0.0.1:8125
- *
- *      < HTTP/1.1 401 Unauthorized
- *      < WWW-Authenticate: Digest realm="Digest Test", qop="auth", nonce="0796e98e1aeef43141fab2a66bf4521a", algorithm="MD5", stale="false"
- *      <
- *      < 401 Unauthorized
- *
  *  - Shutdown the server
  *      > DELETE /guzzle-server
  *      > Host: 127.0.0.1:8125
@@ -53,77 +44,6 @@ var GuzzleServer = function(port, log) {
     this.requests = [];
     var that = this;
 
-    var md5 = function(input) {
-        var crypto = require('crypto');
-        var hasher = crypto.createHash('md5');
-        hasher.update(input);
-        return hasher.digest('hex');
-    }
-
-    /**
-     * Node.js HTTP server authentication module.
-     *
-     * It is only initialized on demand (by loadAuthentifier). This avoids
-     * requiring the dependency to http-auth on standard operations, and the
-     * performance hit at startup.
-     */
-    var auth;
-
-    /**
-     * Provides authentication handlers (Basic, Digest).
-     */
-    var loadAuthentifier = function(type, options) {
-        var typeId = type;
-        if (type == 'digest') {
-            typeId += '.'+(options && options.qop ? options.qop : 'none');
-        }
-        if (!loadAuthentifier[typeId]) {
-            if (!auth) {
-                try {
-                    auth = require('http-auth');
-                } catch (e) {
-                    if (e.code == 'MODULE_NOT_FOUND') {
-                        return;
-                    }
-                }
-            }
-            switch (type) {
-                case 'digest':
-                    var digestParams = {
-                        realm: 'Digest Test',
-                        login: 'me',
-                        password: 'test'
-                    };
-                    if (options && options.qop) {
-                        digestParams.qop = options.qop;
-                    }
-                    loadAuthentifier[typeId] = auth.digest(digestParams, function(username, callback) {
-                        callback(md5(digestParams.login + ':' + digestParams.realm + ':' + digestParams.password));
-                    });
-                    break
-            }
-        }
-        return loadAuthentifier[typeId];
-    };
-
-    var firewallRequest = function(request, req, res, requestHandlerCallback) {
-        var securedAreaUriParts = request.uri.match(/^\/secure\/by-(digest)(\/qop-([^\/]*))?(\/.*)$/);
-        if (securedAreaUriParts) {
-            var authentifier = loadAuthentifier(securedAreaUriParts[1], { qop: securedAreaUriParts[2] });
-            if (!authentifier) {
-                res.writeHead(501, 'HTTP authentication not implemented', { 'Content-Length': 0 });
-                res.end();
-                return;
-            }
-            authentifier.check(req, res, function(req, res) {
-                req.url = securedAreaUriParts[4];
-                requestHandlerCallback(request, req, res);
-            });
-        } else {
-            requestHandlerCallback(request, req, res);
-        }
-    };
-
     var controlRequest = function(request, req, res) {
         if (req.url == '/guzzle-server/perf') {
             res.writeHead(200, 'OK', {'Content-Length': 16});
@@ -220,7 +140,7 @@ var GuzzleServer = function(port, log) {
 
             // Called when the request completes
             req.addListener('end', function() {
-                firewallRequest(request, req, res, receivedRequest);
+                receivedRequest(request, req, res);
             });
         });
 
