diff --git a/core/composer.json b/core/composer.json
index 75814e2..45e0742 100644
--- a/core/composer.json
+++ b/core/composer.json
@@ -22,7 +22,7 @@
     "twig/twig": "1.18.*",
     "doctrine/common": "~2.4.2",
     "doctrine/annotations": "1.2.*",
-    "guzzlehttp/guzzle": "~5.0",
+    "guzzlehttp/guzzle": "~6.0",
     "symfony-cmf/routing": "1.3.*",
     "easyrdf/easyrdf": "0.9.*",
     "phpunit/phpunit": "4.6.*",
@@ -31,8 +31,8 @@
     "stack/builder": "1.0.*",
     "egulias/email-validator": "1.2.*",
     "behat/mink": "~1.6",
-    "behat/mink-goutte-driver": "~1.1",
-    "fabpot/goutte": "^2.0.3",
+    "behat/mink-goutte-driver": "dev-master",
+    "fabpot/goutte": "~3.1",
     "masterminds/html5": "~2.1",
     "symfony/psr-http-message-bridge": "v0.2",
     "zendframework/zend-diactoros": "1.1.0"
diff --git a/core/composer.lock b/core/composer.lock
index 829db15..cfb5145 100644
--- a/core/composer.lock
+++ b/core/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "hash": "a842b991264d42a2f8c5cecbd82597b1",
+    "hash": "86c37f88b0879f2efa54f6b3f683d303",
     "packages": [
         {
             "name": "behat/mink",
@@ -118,22 +118,22 @@
         },
         {
             "name": "behat/mink-goutte-driver",
-            "version": "v1.1.0",
+            "version": "dev-master",
             "source": {
                 "type": "git",
                 "url": "https://github.com/minkphp/MinkGoutteDriver.git",
-                "reference": "2bf327b4166694ecaa8ae7f956cb6ae252ecf03e"
+                "reference": "cc5ce119b5a8e06662f634b35967aff0b0c7dfdd"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/minkphp/MinkGoutteDriver/zipball/2bf327b4166694ecaa8ae7f956cb6ae252ecf03e",
-                "reference": "2bf327b4166694ecaa8ae7f956cb6ae252ecf03e",
+                "url": "https://api.github.com/repos/minkphp/MinkGoutteDriver/zipball/cc5ce119b5a8e06662f634b35967aff0b0c7dfdd",
+                "reference": "cc5ce119b5a8e06662f634b35967aff0b0c7dfdd",
                 "shasum": ""
             },
             "require": {
                 "behat/mink": "~1.6@dev",
                 "behat/mink-browserkit-driver": "~1.2@dev",
-                "fabpot/goutte": "~1.0.4|~2.0",
+                "fabpot/goutte": "~1.0.4|~2.0|~3.1",
                 "php": ">=5.3.1"
             },
             "type": "mink-driver",
@@ -143,8 +143,8 @@
                 }
             },
             "autoload": {
-                "psr-0": {
-                    "Behat\\Mink\\Driver": "src/"
+                "psr-4": {
+                    "Behat\\Mink\\Driver\\": "src/"
                 }
             },
             "notification-url": "https://packagist.org/downloads/",
@@ -166,7 +166,7 @@
                 "headless",
                 "testing"
             ],
-            "time": "2014-10-09 09:21:12"
+            "time": "2015-06-27 00:15:11"
         },
         {
             "name": "doctrine/annotations",
@@ -736,21 +736,21 @@
         },
         {
             "name": "fabpot/goutte",
-            "version": "v2.0.3",
+            "version": "v3.1.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/FriendsOfPHP/Goutte.git",
-                "reference": "65ab61eae03d670b93a9044ad2328eb81aa1bde5"
+                "reference": "d9a5a28782d30e9f4e20176caea58a1d459f2c71"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/65ab61eae03d670b93a9044ad2328eb81aa1bde5",
-                "reference": "65ab61eae03d670b93a9044ad2328eb81aa1bde5",
+                "url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/d9a5a28782d30e9f4e20176caea58a1d459f2c71",
+                "reference": "d9a5a28782d30e9f4e20176caea58a1d459f2c71",
                 "shasum": ""
             },
             "require": {
-                "guzzlehttp/guzzle": ">=4,<6",
-                "php": ">=5.4.0",
+                "guzzlehttp/guzzle": "^6.0",
+                "php": ">=5.5.0",
                 "symfony/browser-kit": "~2.1",
                 "symfony/css-selector": "~2.1",
                 "symfony/dom-crawler": "~2.1"
@@ -758,7 +758,7 @@
             "type": "application",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.0-dev"
+                    "dev-master": "3.1-dev"
                 }
             },
             "autoload": {
@@ -781,25 +781,26 @@
             "keywords": [
                 "scraper"
             ],
-            "time": "2014-11-28 09:48:17"
+            "time": "2015-06-24 16:11:31"
         },
         {
             "name": "guzzlehttp/guzzle",
-            "version": "5.2.0",
+            "version": "6.0.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/guzzle/guzzle.git",
-                "reference": "475b29ccd411f2fa8a408e64576418728c032cfa"
+                "reference": "a8dfeff00eb84616a17fea7a4d72af35e750410f"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/475b29ccd411f2fa8a408e64576418728c032cfa",
-                "reference": "475b29ccd411f2fa8a408e64576418728c032cfa",
+                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/a8dfeff00eb84616a17fea7a4d72af35e750410f",
+                "reference": "a8dfeff00eb84616a17fea7a4d72af35e750410f",
                 "shasum": ""
             },
             "require": {
-                "guzzlehttp/ringphp": "~1.0",
-                "php": ">=5.4.0"
+                "guzzlehttp/promises": "~1.0",
+                "guzzlehttp/psr7": "~1.1",
+                "php": ">=5.5.0"
             },
             "require-dev": {
                 "ext-curl": "*",
@@ -809,10 +810,13 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "5.0-dev"
+                    "dev-master": "6.0-dev"
                 }
             },
             "autoload": {
+                "files": [
+                    "src/functions_include.php"
+                ],
                 "psr-4": {
                     "GuzzleHttp\\": "src/"
                 }
@@ -828,7 +832,7 @@
                     "homepage": "https://github.com/mtdowling"
                 }
             ],
-            "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients",
+            "description": "Guzzle is a PHP HTTP client library",
             "homepage": "http://guzzlephp.org/",
             "keywords": [
                 "client",
@@ -839,34 +843,28 @@
                 "rest",
                 "web service"
             ],
-            "time": "2015-01-28 01:03:29"
+            "time": "2015-07-04 20:09:24"
         },
         {
-            "name": "guzzlehttp/ringphp",
-            "version": "1.0.7",
+            "name": "guzzlehttp/promises",
+            "version": "1.0.1",
             "source": {
                 "type": "git",
-                "url": "https://github.com/guzzle/RingPHP.git",
-                "reference": "52d868f13570a9a56e5fce6614e0ec75d0f13ac2"
+                "url": "https://github.com/guzzle/promises.git",
+                "reference": "2ee5bc7f1a92efecc90da7f6711a53a7be26b5b7"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/RingPHP/zipball/52d868f13570a9a56e5fce6614e0ec75d0f13ac2",
-                "reference": "52d868f13570a9a56e5fce6614e0ec75d0f13ac2",
+                "url": "https://api.github.com/repos/guzzle/promises/zipball/2ee5bc7f1a92efecc90da7f6711a53a7be26b5b7",
+                "reference": "2ee5bc7f1a92efecc90da7f6711a53a7be26b5b7",
                 "shasum": ""
             },
             "require": {
-                "guzzlehttp/streams": "~3.0",
-                "php": ">=5.4.0",
-                "react/promise": "~2.0"
+                "php": ">=5.5.0"
             },
             "require-dev": {
-                "ext-curl": "*",
                 "phpunit/phpunit": "~4.0"
             },
-            "suggest": {
-                "ext-curl": "Guzzle will use specific adapters if cURL is present"
-            },
             "type": "library",
             "extra": {
                 "branch-alias": {
@@ -875,8 +873,11 @@
             },
             "autoload": {
                 "psr-4": {
-                    "GuzzleHttp\\Ring\\": "src/"
-                }
+                    "GuzzleHttp\\Promise\\": "src/"
+                },
+                "files": [
+                    "src/functions.php"
+                ]
             },
             "notification-url": "https://packagist.org/downloads/",
             "license": [
@@ -889,25 +890,32 @@
                     "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"
+            "description": "Guzzle promises library",
+            "keywords": [
+                "promise"
+            ],
+            "time": "2015-06-24 16:16:25"
         },
         {
-            "name": "guzzlehttp/streams",
-            "version": "3.0.0",
+            "name": "guzzlehttp/psr7",
+            "version": "1.1.0",
             "source": {
                 "type": "git",
-                "url": "https://github.com/guzzle/streams.git",
-                "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5"
+                "url": "https://github.com/guzzle/psr7.git",
+                "reference": "af0e1758de355eb113917ad79c3c0e3604bce4bd"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/guzzle/streams/zipball/47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
-                "reference": "47aaa48e27dae43d39fc1cea0ccf0d84ac1a2ba5",
+                "url": "https://api.github.com/repos/guzzle/psr7/zipball/af0e1758de355eb113917ad79c3c0e3604bce4bd",
+                "reference": "af0e1758de355eb113917ad79c3c0e3604bce4bd",
                 "shasum": ""
             },
             "require": {
-                "php": ">=5.4.0"
+                "php": ">=5.4.0",
+                "psr/http-message": "~1.0"
+            },
+            "provide": {
+                "psr/http-message-implementation": "1.0"
             },
             "require-dev": {
                 "phpunit/phpunit": "~4.0"
@@ -915,13 +923,16 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "3.0-dev"
+                    "dev-master": "1.0-dev"
                 }
             },
             "autoload": {
                 "psr-4": {
-                    "GuzzleHttp\\Stream\\": "src/"
-                }
+                    "GuzzleHttp\\Psr7\\": "src/"
+                },
+                "files": [
+                    "src/functions.php"
+                ]
             },
             "notification-url": "https://packagist.org/downloads/",
             "license": [
@@ -934,13 +945,14 @@
                     "homepage": "https://github.com/mtdowling"
                 }
             ],
-            "description": "Provides a simple abstraction over streams of data",
-            "homepage": "http://guzzlephp.org/",
+            "description": "PSR-7 message implementation",
             "keywords": [
-                "Guzzle",
-                "stream"
+                "http",
+                "message",
+                "stream",
+                "uri"
             ],
-            "time": "2014-10-12 19:18:40"
+            "time": "2015-06-24 19:55:15"
         },
         {
             "name": "masterminds/html5",
@@ -1623,50 +1635,6 @@
             "time": "2012-12-21 11:40:51"
         },
         {
-            "name": "react/promise",
-            "version": "v2.2.0",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/reactphp/promise.git",
-                "reference": "365fcee430dfa4ace1fbc75737ca60ceea7eeeef"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/reactphp/promise/zipball/365fcee430dfa4ace1fbc75737ca60ceea7eeeef",
-                "reference": "365fcee430dfa4ace1fbc75737ca60ceea7eeeef",
-                "shasum": ""
-            },
-            "require": {
-                "php": ">=5.4.0"
-            },
-            "type": "library",
-            "extra": {
-                "branch-alias": {
-                    "dev-master": "2.0-dev"
-                }
-            },
-            "autoload": {
-                "psr-4": {
-                    "React\\Promise\\": "src/"
-                },
-                "files": [
-                    "src/functions_include.php"
-                ]
-            },
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Jan Sorgalla",
-                    "email": "jsorgalla@googlemail.com"
-                }
-            ],
-            "description": "A lightweight implementation of CommonJS Promises/A for PHP",
-            "time": "2014-12-30 13:32:42"
-        },
-        {
             "name": "sdboyer/gliph",
             "version": "0.1.8",
             "source": {
@@ -2194,16 +2162,16 @@
         },
         {
             "name": "symfony/browser-kit",
-            "version": "v2.7.0",
+            "version": "v2.7.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/BrowserKit.git",
-                "reference": "70cdc18dd601a486a8cc69ee26367cbaedd60400"
+                "reference": "d0a144a1a96d5dc90bed2814b2096a1322761672"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/70cdc18dd601a486a8cc69ee26367cbaedd60400",
-                "reference": "70cdc18dd601a486a8cc69ee26367cbaedd60400",
+                "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/d0a144a1a96d5dc90bed2814b2096a1322761672",
+                "reference": "d0a144a1a96d5dc90bed2814b2096a1322761672",
                 "shasum": ""
             },
             "require": {
@@ -2245,7 +2213,7 @@
             ],
             "description": "Symfony BrowserKit Component",
             "homepage": "https://symfony.com",
-            "time": "2015-05-02 15:21:08"
+            "time": "2015-06-04 20:11:48"
         },
         {
             "name": "symfony/class-loader",
@@ -2529,7 +2497,7 @@
         },
         {
             "name": "symfony/dom-crawler",
-            "version": "v2.7.0",
+            "version": "v2.7.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/DomCrawler.git",
@@ -3446,7 +3414,9 @@
     "packages-dev": [],
     "aliases": [],
     "minimum-stability": "dev",
-    "stability-flags": [],
+    "stability-flags": {
+        "behat/mink-goutte-driver": 20
+    },
     "prefer-stable": true,
     "prefer-lowest": false,
     "platform": {
diff --git a/core/core.services.yml b/core/core.services.yml
index 5cd3422..ef9ccd8 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -374,10 +374,13 @@ services:
   path.current:
     class: Drupal\Core\Path\CurrentPathStack
     arguments: ['@request_stack']
+  http_handler_stack:
+    class: GuzzleHttp\HandlerStack
+    public: false
+    factory: [GuzzleHttp\HandlerStack, create]
   http_client:
     class: Drupal\Core\Http\Client
-    tags:
-      - { name: service_collector, tag: http_client_subscriber, call: attach }
+    arguments: ['@http_handler_stack']
   theme.negotiator:
     class: Drupal\Core\Theme\ThemeNegotiator
     arguments: ['@access_check.theme']
diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php
index 0c4305b..1830d5b 100644
--- a/core/lib/Drupal.php
+++ b/core/lib/Drupal.php
@@ -395,7 +395,7 @@ public static function state() {
   /**
    * Returns the default http client.
    *
-   * @return \GuzzleHttp\ClientInterface
+   * @return \GuzzleHttp\Client
    *   A guzzle http client instance.
    */
   public static function httpClient() {
diff --git a/core/lib/Drupal/Core/CoreServiceProvider.php b/core/lib/Drupal/Core/CoreServiceProvider.php
index 8244320..cac83a6 100644
--- a/core/lib/Drupal/Core/CoreServiceProvider.php
+++ b/core/lib/Drupal/Core/CoreServiceProvider.php
@@ -10,6 +10,7 @@
 use Drupal\Core\Cache\Context\CacheContextsPass;
 use Drupal\Core\Cache\ListCacheBinsPass;
 use Drupal\Core\DependencyInjection\Compiler\BackendCompilerPass;
+use Drupal\Core\DependencyInjection\Compiler\GuzzleHandlerPass;
 use Drupal\Core\DependencyInjection\Compiler\ContextProvidersPass;
 use Drupal\Core\DependencyInjection\Compiler\ProxyServicesPass;
 use Drupal\Core\DependencyInjection\Compiler\RegisterLazyRouteEnhancers;
@@ -75,6 +76,7 @@ public function register(ContainerBuilder $container) {
     // Collect tagged handler services as method calls on consumer services.
     $container->addCompilerPass(new TaggedHandlersPass());
     $container->addCompilerPass(new RegisterStreamWrappersPass());
+    $container->addCompilerPass(new GuzzleHandlerPass());
 
     // Add a compiler pass for registering event subscribers.
     $container->addCompilerPass(new RegisterKernelListenersPass(), PassConfig::TYPE_AFTER_REMOVING);
@@ -134,8 +136,8 @@ protected function registerTest(ContainerBuilder $container) {
     }
     // Add the HTTP request subscriber to Guzzle.
     $container
-      ->register('test.http_client.request_subscriber', 'Drupal\Core\Test\EventSubscriber\HttpRequestSubscriber')
-      ->addTag('http_client_subscriber');
+      ->register('test.http_client.handler', 'Drupal\Core\Test\EventSubscriber\HttpRequestSubscriber')
+      ->addTag('http_client_handler');
   }
 
 }
diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/GuzzleHandlerPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/GuzzleHandlerPass.php
new file mode 100644
index 0000000..d6dedbf
--- /dev/null
+++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/GuzzleHandlerPass.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\DependencyInjection\Compiler\GuzzleHandlerPass.
+ */
+
+namespace Drupal\Core\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Reference;
+
+class GuzzleHandlerPass implements CompilerPassInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function process(ContainerBuilder $container) {
+    foreach ($container->findTaggedServiceIds('http_client_handler') as $id => $attributes) {
+      $container->getDefinition('http_handler_stack')
+        ->addMethodCall('push', [new Reference($id)]);
+    }
+  }
+
+}
diff --git a/core/lib/Drupal/Core/Http/Client.php b/core/lib/Drupal/Core/Http/Client.php
index fd27b67..afcd8ce 100644
--- a/core/lib/Drupal/Core/Http/Client.php
+++ b/core/lib/Drupal/Core/Http/Client.php
@@ -10,17 +10,30 @@
 use Drupal\Component\Utility\NestedArray;
 use Drupal\Core\Site\Settings;
 use GuzzleHttp\Client as GuzzleClient;
-use GuzzleHttp\Event\SubscriberInterface;
+use GuzzleHttp\Handler\Proxy;
+use GuzzleHttp\HandlerStack;
+use GuzzleHttp\Middleware;
+use Psr\Http\Message\RequestInterface;
+use Psr\Http\Message\ResponseInterface;
 
 /**
  * Drupal default HTTP client class.
  */
 class Client extends GuzzleClient {
 
+  protected $effectiveUrl;
+
   /**
    * {@inheritdoc}
    */
-  public function __construct(array $config = []) {
+  public function __construct(HandlerStack $stack, array $config = []) {
+    $stack->after('allow_redirects', Middleware::mapRequest(function (RequestInterface $request) {
+      $this->effectiveUrl = $request->getUri();
+      return $request;
+    }), 'check_redirect');
+    $stack->after('allow_redirects', Middleware::mapResponse(function (ResponseInterface $response) {
+      return $response->withHeader('X-Effective-Url', (string) $this->effectiveUrl);
+    }), 'store_redirect');
     $default_config = array(
       // Security consideration: we must not use the certificate authority
       // file shipped with Guzzle because it can easily get outdated if a
@@ -31,8 +44,9 @@ public function __construct(array $config = []) {
       'verify' => TRUE,
       'timeout' => 30,
       'headers' => array(
-        'User-Agent' => 'Drupal/' . \Drupal::VERSION . ' (+https://www.drupal.org/) ' . static::getDefaultUserAgent(),
+        'User-Agent' => 'Drupal/' . \Drupal::VERSION . ' (+https://www.drupal.org/) ' . \GuzzleHttp\default_user_agent(),
       ),
+      'handler' => $stack,
     );
 
     // The entire config array is merged/configurable to allow Guzzle client
@@ -40,31 +54,7 @@ public function __construct(array $config = []) {
     // 'message_factory'.
     $config = NestedArray::mergeDeep(array('defaults' => $default_config), $config, Settings::get('http_client_config', array()));
 
-    parent::__construct($config);
-  }
-
-  /**
-   * Attaches an event subscriber.
-   *
-   * @param \GuzzleHttp\Event\SubscriberInterface $subscriber
-   *   The subscriber to attach.
-   *
-   * @see \GuzzleHttp\Event\Emitter::attach()
-   */
-  public function attach(SubscriberInterface $subscriber) {
-    $this->getEmitter()->attach($subscriber);
-  }
-
-  /**
-   * Detaches an event subscriber.
-   *
-   * @param \GuzzleHttp\Event\SubscriberInterface $subscriber
-   *   The subscriber to detach.
-   *
-   * @see \GuzzleHttp\Event\Emitter::detach()
-   */
-  public function detach(SubscriberInterface $subscriber) {
-    $this->getEmitter()->detach($subscriber);
+    parent::__construct($config['defaults']);
   }
 
 }
diff --git a/core/lib/Drupal/Core/Test/EventSubscriber/HttpRequestSubscriber.php b/core/lib/Drupal/Core/Test/EventSubscriber/HttpRequestSubscriber.php
index 776f2c1..2cb8299 100644
--- a/core/lib/Drupal/Core/Test/EventSubscriber/HttpRequestSubscriber.php
+++ b/core/lib/Drupal/Core/Test/EventSubscriber/HttpRequestSubscriber.php
@@ -7,36 +7,31 @@
 
 namespace Drupal\Core\Test\EventSubscriber;
 
-use GuzzleHttp\Event\BeforeEvent;
-use GuzzleHttp\Event\SubscriberInterface;
+use Psr\Http\Message\RequestInterface;
 
 /**
  * Overrides the User-Agent HTTP header for outbound HTTP requests.
  */
-class HttpRequestSubscriber implements SubscriberInterface {
+class HttpRequestSubscriber {
 
   /**
    * {@inheritdoc}
    */
-  public function getEvents() {
-    return array(
-      'before' => array('onBeforeSendRequest'),
-    );
-  }
-
-  /**
-   * Event callback for the 'before' event
-   */
-  public function onBeforeSendRequest(BeforeEvent $event) {
+  public function __invoke($name) {
     // If the database prefix is being used by SimpleTest to run the tests in a copied
     // database then set the user-agent header to the database prefix so that any
     // calls to other Drupal pages will run the SimpleTest prefixed database. The
     // user-agent is used to ensure that multiple testing sessions running at the
     // same time won't interfere with each other as they would if the database
     // prefix were stored statically in a file or database variable.
-    if ($test_prefix = drupal_valid_test_ua()) {
-      $event->getRequest()->setHeader('User-Agent', drupal_generate_test_ua($test_prefix));
-    }
+    return function (callable $handler) {
+      return function (RequestInterface $request, array $options) use ($handler) {
+        if ($test_prefix = drupal_valid_test_ua()) {
+          $request = $request->withHeader('User-Agent', drupal_generate_test_ua($test_prefix));
+        }
+        return $handler($request, $options);
+      };
+    };
   }
 
 }
diff --git a/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php b/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php
index be12c43..2434b74 100644
--- a/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php
+++ b/core/modules/aggregator/src/Plugin/aggregator/fetcher/DefaultFetcher.php
@@ -13,6 +13,7 @@
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use GuzzleHttp\ClientInterface;
 use GuzzleHttp\Exception\RequestException;
+use GuzzleHttp\Psr7\Request;
 use Psr\Log\LoggerInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -70,15 +71,15 @@ public static function create(ContainerInterface $container, array $configuratio
    * {@inheritdoc}
    */
   public function fetch(FeedInterface $feed) {
-    $request = $this->httpClient->createRequest('GET', $feed->getUrl());
+    $request = new Request('GET', $feed->getUrl());
     $feed->source_string = FALSE;
 
     // Generate conditional GET headers.
     if ($feed->getEtag()) {
-      $request->addHeader('If-None-Match', $feed->getEtag());
+      $request = $request->withAddedHeader('If-None-Match', $feed->getEtag());
     }
     if ($feed->getLastModified()) {
-      $request->addHeader('If-Modified-Since', gmdate(DateTimePlus::RFC7231, $feed->getLastModified()));
+      $request = $request->withAddedHeader('If-Modified-Since', gmdate(DateTimePlus::RFC7231, $feed->getLastModified()));
     }
 
     try {
@@ -91,13 +92,13 @@ public function fetch(FeedInterface $feed) {
       }
 
       $feed->source_string = (string) $response->getBody();
-      $feed->setEtag($response->getHeader('ETag'));
-      $feed->setLastModified(strtotime($response->getHeader('Last-Modified')));
+      $feed->setEtag($response->getHeader('ETag')[0]);
+      $feed->setLastModified(strtotime($response->getHeader('Last-Modified')[0]));
       $feed->http_headers = $response->getHeaders();
 
       // Update the feed URL in case of a 301 redirect.
-      if ($response->getEffectiveUrl() != $feed->getUrl()) {
-        $feed->setUrl($response->getEffectiveUrl());
+      if ($response->getHeader('X-Effective-Url')[0] != $feed->getUrl()) {
+        $feed->setUrl($response->getHeader('X-Effective-Url')[0]);
       }
       return TRUE;
     }
diff --git a/core/modules/locale/locale.batch.inc b/core/modules/locale/locale.batch.inc
index d06178f..95333eb 100644
--- a/core/modules/locale/locale.batch.inc
+++ b/core/modules/locale/locale.batch.inc
@@ -238,11 +238,11 @@ function locale_translation_http_check($uri) {
     $result = array();
 
     // Return the effective URL if it differs from the requested.
-    if ($response->getEffectiveUrl() != $uri) {
-      $result['location'] = $response->getEffectiveUrl();
-    }
+//    if ($response->getEffectiveUrl() != $uri) {
+//      $result['location'] = $response->getEffectiveUrl();
+//    }
 
-    $result['last_modified'] = $response->hasHeader('Last-Modified') ? strtotime($response->getHeader('Last-Modified')) : 0;
+    $result['last_modified'] = $response->hasHeader('Last-Modified') ? strtotime($response->getHeader('Last-Modified')[0]) : 0;
     return $result;
   }
   catch (RequestException $e) {
