diff --git a/core/core.services.yml b/core/core.services.yml
index 53a2725..33e706e 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -769,10 +769,6 @@ services:
   password:
     class: Drupal\Core\Password\PhpassHashedPassword
     arguments: [16]
-  accept_header_matcher:
-    class: Drupal\Core\Routing\AcceptHeaderMatcher
-    tags:
-      - { name: route_filter }
   content_type_header_matcher:
     class: Drupal\Core\Routing\ContentTypeHeaderMatcher
     tags:
diff --git a/core/lib/Drupal/Core/ContentNegotiation.php b/core/lib/Drupal/Core/ContentNegotiation.php
index 857f9d5..982e2ef 100644
--- a/core/lib/Drupal/Core/ContentNegotiation.php
+++ b/core/lib/Drupal/Core/ContentNegotiation.php
@@ -26,10 +26,14 @@ class ContentNegotiation {
    * @param \Symfony\Component\HttpFoundation\Request $request
    *   The request object from which to extract the content type.
    *
-   * @return string
+   * @return string|NULL
    *   The normalized type of a given request.
    */
   public function getContentType(Request $request) {
+    if ($format = $request->getRequestFormat(NULL)) {
+      return $format;
+    }
+
     // AJAX iframe uploads need special handling, because they contain a JSON
     // response wrapped in <textarea>.
     if ($request->get('ajax_iframe_upload', FALSE)) {
@@ -37,28 +41,18 @@ public function getContentType(Request $request) {
     }
 
     // Check all formats, if priority format is found return it.
-    $first_found_format = FALSE;
-    $priority = array('html', 'drupal_ajax', 'drupal_modal', 'drupal_dialog');
+    $priority = array('drupal_ajax', 'drupal_modal', 'drupal_dialog');
     foreach ($request->getAcceptableContentTypes() as $mime_type) {
       $format = $request->getFormat($mime_type);
       if (in_array($format, $priority, TRUE)) {
         return $format;
       }
-      if (!is_null($format) && !$first_found_format) {
-        $first_found_format = $format;
-      }
-    }
-
-    // No HTML found, return first found.
-    if ($first_found_format) {
-      return $first_found_format;
     }
 
     if ($request->isXmlHttpRequest()) {
       return 'ajax';
     }
 
-    // Do HTML last so that it always wins.
-    return 'html';
+    return NULL;
   }
 }
diff --git a/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php
index fcc51a3..1ee5808 100644
--- a/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php
@@ -76,7 +76,7 @@ public function onViewRenderArray(GetResponseForControllerResultEvent $event) {
     $request = $event->getRequest();
     $result = $event->getControllerResult();
 
-    $format = $request->getRequestFormat();
+    $format = $request->getRequestFormat(NULL);
 
     // Render the controller result into a response if it's a render array.
     if (is_array($result)) {
diff --git a/core/lib/Drupal/Core/Routing/AcceptHeaderMatcher.php b/core/lib/Drupal/Core/Routing/AcceptHeaderMatcher.php
deleted file mode 100644
index 7794800..0000000
--- a/core/lib/Drupal/Core/Routing/AcceptHeaderMatcher.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\Core\Routing\AcceptHeaderMatcher.
- */
-
-namespace Drupal\Core\Routing;
-
-use Drupal\Component\Utility\SafeMarkup;
-use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException;
-use Symfony\Component\Routing\Route;
-use Symfony\Component\Routing\RouteCollection;
-
-/**
- * Filters routes based on the media type specified in the HTTP Accept headers.
- */
-class AcceptHeaderMatcher implements RouteFilterInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function filter(RouteCollection $collection, Request $request) {
-    // Generates a list of Symfony formats matching the acceptable MIME types.
-    // @todo replace by proper content negotiation library.
-    $acceptable_mime_types = $request->getAcceptableContentTypes();
-    $acceptable_formats = array_filter(array_map(array($request, 'getFormat'), $acceptable_mime_types));
-    $primary_format = $request->getRequestFormat();
-
-    foreach ($collection as $name => $route) {
-      // _format could be a |-delimited list of supported formats.
-      $supported_formats = array_filter(explode('|', $route->getRequirement('_format')));
-
-      if (empty($supported_formats)) {
-        // No format restriction on the route, so it always matches. Move it to
-        // the end of the collection by re-adding it.
-        $collection->add($name, $route);
-      }
-      elseif (in_array($primary_format, $supported_formats)) {
-        // Perfect match, which will get a higher priority by leaving the route
-        // on top of the list.
-      }
-      // The route partially matches if it doesn't care about format, if it
-      // explicitly allows any format, or if one of its allowed formats is
-      // in the request's list of acceptable formats.
-      elseif (in_array('*/*', $acceptable_mime_types) || array_intersect($acceptable_formats, $supported_formats)) {
-        // Move it to the end of the list.
-        $collection->add($name, $route);
-      }
-      else {
-        // Remove the route if it does not match at all.
-        $collection->remove($name);
-      }
-    }
-
-    if (count($collection)) {
-      return $collection;
-    }
-
-    // We do not throw a
-    // \Symfony\Component\Routing\Exception\ResourceNotFoundException here
-    // because we don't want to return a 404 status code, but rather a 406.
-    throw new NotAcceptableHttpException(SafeMarkup::format('No route found for the specified formats @formats.', array('@formats' => implode(' ', $acceptable_mime_types))));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function applies(Route $route) {
-    return TRUE;
-  }
-
-}
diff --git a/core/lib/Drupal/Core/Routing/RouteCompiler.php b/core/lib/Drupal/Core/Routing/RouteCompiler.php
index 9e6de2c..e42b471 100644
--- a/core/lib/Drupal/Core/Routing/RouteCompiler.php
+++ b/core/lib/Drupal/Core/Routing/RouteCompiler.php
@@ -41,8 +41,17 @@ public static function compile(Route $route) {
 
     // The Drupal-specific compiled information.
     $stripped_path = static::getPathWithoutDefaults($route);
-    $fit = static::getFit($stripped_path);
     $pattern_outline = static::getPatternOutline($stripped_path);
+    // Handle routes that specify a _format requirement and have a matching
+    // extension in the path pattern. This transforms 'node/%.json'
+    // to 'node/%/json'.
+    if ($format = $route->getRequirement('_format')) {
+      $matches = [];
+      if (preg_match('#^(.+/%)\.' . preg_quote($format) . '$#', $pattern_outline, $matches)) {
+        $pattern_outline = $matches[1] . '/' . $format;
+      }
+    }
+    $fit = static::getFit($pattern_outline);
     $num_parts = count(explode('/', trim($pattern_outline, '/')));
 
     return new CompiledRoute(
@@ -99,7 +108,7 @@ public static function getFit($path) {
     // patterns we need to check in the RouteProvider.
     $fit = 0;
     foreach ($parts as $k => $part) {
-      if (strpos($part, '{') === FALSE) {
+      if ($part !== '%') {
         $fit |=  1 << ($slashes - $k);
       }
     }
diff --git a/core/lib/Drupal/Core/Routing/RouteProvider.php b/core/lib/Drupal/Core/Routing/RouteProvider.php
index 4d389f1..34f361e 100644
--- a/core/lib/Drupal/Core/Routing/RouteProvider.php
+++ b/core/lib/Drupal/Core/Routing/RouteProvider.php
@@ -175,61 +175,81 @@ public function getRoutesByNames($names) {
    *   An array of outlines that could match the specified path parts.
    */
   public function getCandidateOutlines(array $parts) {
-    $number_parts = count($parts);
+    $extension_flag = FALSE;
     $ancestors = array();
-    $length = $number_parts - 1;
-    $end = (1 << $number_parts) - 1;
-
-    // The highest possible mask is a 1 bit for every part of the path. We will
-    // check every value down from there to generate a possible outline.
-    if ($number_parts == 1) {
-      $masks = array(1);
-    }
-    elseif ($number_parts <= 3) {
-      // Optimization - don't query the state system for short paths. This also
-      // insulates against the state entry for masks going missing for common
-      // user-facing paths since we generate all values without checking state.
-      $masks = range($end, 1);
-    }
-    elseif ($number_parts <= 0) {
-      // No path can match, short-circuit the process.
-      $masks = array();
+    $things[] = $parts;
+    // Handle trailing format specifiers like '.json'.
+    $last_part = array_pop($parts);
+    // Look for dot preceded and followed by 1 or more characters.
+    $pos = strrpos($last_part, '.');
+    if ($pos > 0 && $pos < strlen($last_part)) {
+      $parts[] = substr($last_part, 0, $pos);
+      $parts[] = substr($last_part, $pos + 1);
+      $things[] = $parts;
     }
-    else {
-      // Get the actual patterns that exist out of state.
-      $masks = (array) $this->state->get('routing.menu_masks.' . $this->tableName, array());
-    }
-
-
-    // Only examine patterns that actually exist as router items (the masks).
-    foreach ($masks as $i) {
-      if ($i > $end) {
-        // Only look at masks that are not longer than the path of interest.
-        continue;
+    foreach ($things as $parts) {
+      $number_parts = count($parts);
+      $length = $number_parts - 1;
+      $end = (1 << $number_parts) - 1;
+
+      // The highest possible mask is a 1 bit for every part of the path. We will
+      // check every value down from there to generate a possible outline.
+      if ($number_parts == 1) {
+        $masks = array(1);
+      }
+      elseif ($number_parts <= 3) {
+        // Optimization - don't query the state system for short paths. This also
+        // insulates against the state entry for masks going missing for common
+        // user-facing paths since we generate all values without checking state.
+        $masks = range($end, 1);
+      }
+      elseif ($number_parts <= 0) {
+        // No path can match, short-circuit the process.
+        $masks = array();
       }
-      elseif ($i < (1 << $length)) {
-        // We have exhausted the masks of a given length, so decrease the length.
-        --$length;
+      else {
+        // Get the actual patterns that exist out of state.
+        $masks = (array) $this->state->get('routing.menu_masks.' . $this->tableName, array());
       }
-      $current = '';
-      for ($j = $length; $j >= 0; $j--) {
-        // Check the bit on the $j offset.
-        if ($i & (1 << $j)) {
-          // Bit one means the original value.
-          $current .= $parts[$length - $j];
+
+
+      // Only examine patterns that actually exist as router items (the masks).
+      foreach ($masks as $i) {
+        if ($i > $end) {
+          // Only look at masks that are not longer than the path of interest.
+          continue;
         }
-        else {
-          // Bit zero means means wildcard.
-          $current .= '%';
+        elseif ($i < (1 << $length)) {
+          // If examining a second parts array, we only care about masks with
+          // the exact length.
+          if ($extension_flag) {
+            break;
+          }
+          // We have exhausted the masks of a given length, so decrease the length.
+          --$length;
         }
-        // Unless we are at offset 0, add a slash.
-        if ($j) {
-          $current .= '/';
+        $current = '';
+        for ($j = $length; $j >= 0; $j--) {
+          // Check the bit on the $j offset. When making a second pass for file
+          // extension, we do not want to consider a trailing wildcard.
+          if ($i & (1 << $j) || ($extension_flag && $j == 0)) {
+            // Bit one means the original value.
+            $current .= $parts[$length - $j];
+          }
+          else {
+            // Bit zero means means wildcard.
+            $current .= '%';
+          }
+          // Unless we are at offset 0, add a slash.
+          if ($j) {
+            $current .= '/';
+          }
         }
+        $ancestors['/' . $current] = 1;
       }
-      $ancestors[] = '/' . $current;
+      $extension_flag = TRUE;
     }
-    return $ancestors;
+    return array_keys($ancestors);
   }
 
   /**
diff --git a/core/modules/hal/src/HalServiceProvider.php b/core/modules/hal/src/HalServiceProvider.php
deleted file mode 100644
index d8ac47f..0000000
--- a/core/modules/hal/src/HalServiceProvider.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\hal\HalServiceProvider.
- */
-
-namespace Drupal\hal;
-
-use Drupal\Core\DependencyInjection\ContainerBuilder;
-use Drupal\Core\DependencyInjection\ServiceModifierInterface;
-
-/**
- * Adds hal+json as known format.
- */
-class HalServiceProvider implements ServiceModifierInterface {
-
-  /**
-   * {@inheritdoc}
-   */
-  public function alter(ContainerBuilder $container) {
-    if ($container->has('http_middleware.negotiation')) {
-      $container->getDefinition('http_middleware.negotiation')->addMethodCall('registerFormat', ['hal_json', ['application/hal+json']]);
-    }
-  }
-
-}
-
diff --git a/core/modules/rest/src/Plugin/ResourceBase.php b/core/modules/rest/src/Plugin/ResourceBase.php
index 70d6268..2a2ac2f 100644
--- a/core/modules/rest/src/Plugin/ResourceBase.php
+++ b/core/modules/rest/src/Plugin/ResourceBase.php
@@ -18,6 +18,9 @@
 /**
  * Common base class for resource plugins.
  *
+ * Note that the generated routes are altered actually added to the router by
+ * Drupal\rest\Routing\ResourceRoutes::alterRoutes()
+ *
  * @see \Drupal\rest\Annotation\RestResource
  * @see \Drupal\rest\Plugin\Type\ResourcePluginManager
  * @see \Drupal\rest\Plugin\ResourceInterface
@@ -111,7 +114,7 @@ public function routes() {
 
       switch ($method) {
         case 'POST':
-          $route->setPattern($create_path);
+          $route->setPath($create_path);
           // Restrict the incoming HTTP Content-type header to the known
           // serialization formats.
           $route->addRequirements(array('_content_type_format' => implode('|', $this->serializerFormats)));
@@ -132,6 +135,7 @@ public function routes() {
           foreach ($this->serializerFormats as $format_name) {
             // Expose one route per available format.
             $format_route = clone $route;
+            $format_route->setPath($canonical_path . '.' . $format_name);
             $format_route->addRequirements(array('_format' => $format_name));
             $collection->add("$route_name.$method.$format_name", $format_route);
           }
diff --git a/core/modules/rest/src/Routing/ResourceRoutes.php b/core/modules/rest/src/Routing/ResourceRoutes.php
index db439dc..3848fa1 100644
--- a/core/modules/rest/src/Routing/ResourceRoutes.php
+++ b/core/modules/rest/src/Routing/ResourceRoutes.php
@@ -73,6 +73,7 @@ protected function alterRoutes(RouteCollection $collection) {
     foreach ($enabled_resources as $id => $enabled_methods) {
       $plugin = $this->manager->getInstance(array('id' => $id));
 
+      /** @var \Symfony\Component\Routing\Route $route */
       foreach ($plugin->routes() as $name => $route) {
         $method = $route->getRequirement('_method');
         // Only expose routes where the method is enabled in the configuration.
diff --git a/core/modules/rest/src/Tests/RESTTestBase.php b/core/modules/rest/src/Tests/RESTTestBase.php
index e8e1080..051f38c 100644
--- a/core/modules/rest/src/Tests/RESTTestBase.php
+++ b/core/modules/rest/src/Tests/RESTTestBase.php
@@ -62,6 +62,18 @@ protected function setUp() {
     $this->drupalCreateContentType(array('name' => 'resttest', 'type' => 'resttest'));
   }
 
+  protected function mimeToExtension($mime_type) {
+    switch ($mime_type) {
+      case 'application/hal+json':
+        return '.hal_json';
+      case 'application/json':
+        return '.json';
+      case 'application/xml':
+        return '.xml';
+    }
+    return '';
+  }
+
   /**
    * Helper function to issue a HTTP request with simpletest's cURL.
    *
@@ -90,13 +102,14 @@ protected function httpRequest($url, $method, $body = NULL, $mime_type = NULL) {
 
     switch ($method) {
       case 'GET':
+        // Append the content type extension.
+        $url .= $this->mimeToExtension($mime_type);
         // Set query if there are additional GET parameters.
         $curl_options = array(
           CURLOPT_HTTPGET => TRUE,
           CURLOPT_CUSTOMREQUEST => 'GET',
           CURLOPT_URL => $url,
           CURLOPT_NOBODY => FALSE,
-          CURLOPT_HTTPHEADER => array('Accept: ' . $mime_type),
         );
         break;
 
diff --git a/core/modules/rest/src/Tests/ResourceTest.php b/core/modules/rest/src/Tests/ResourceTest.php
index be02617..767ae04 100644
--- a/core/modules/rest/src/Tests/ResourceTest.php
+++ b/core/modules/rest/src/Tests/ResourceTest.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Definition of Drupal\rest\test\ResourceTest.
+ * Contains Drupal\rest\Tests\ResourceTest.
  */
 
 namespace Drupal\rest\Tests;
@@ -24,13 +24,26 @@ class ResourceTest extends RESTTestBase {
   public static $modules = array('hal', 'rest', 'entity_test');
 
   /**
+   * Test entity for requests.
+   *
+   * @var  \Drupal\entity_test\Entity\EntityTest
+   */
+  protected $entity;
+
+  /**
+   * The rest config settings.
+   *
+   * @var \Drupal\Core\Config\Config
+   */
+  protected $config;
+
+  /**
    * {@inheritdoc}
    */
   protected function setUp() {
     parent::setUp();
     $this->config = $this->config('rest.settings');
 
-    // Create an entity programmatically.
     $this->entity = $this->entityCreate('entity_test');
     $this->entity->save();
   }
@@ -38,7 +51,7 @@ protected function setUp() {
   /**
    * Tests that a resource without formats cannot be enabled.
    */
-  public function testFormats() {
+  public function testFormatRequired() {
     $settings = array(
       'entity:entity_test' => array(
         'GET' => array(
@@ -54,20 +67,18 @@ public function testFormats() {
     $this->config->save();
     $this->rebuildCache();
 
-    // Verify that accessing the resource returns 401.
-    $response = $this->httpRequest($this->entity->urlInfo(), 'GET', NULL, $this->defaultMimeType);
-    // AcceptHeaderMatcher considers the canonical, non-REST route a match, but
-    // a lower quality one: no format restrictions means there's always a match,
-    // and hence when there is no matching REST route, the non-REST route is
-    // used, but it can't render into application/hal+json, so it returns a 406.
-    $this->assertResponse('406', 'HTTP response code is 406 when the resource does not define formats, because it falls back to the canonical, non-REST route.');
+    $this->httpRequest($this->entity->urlInfo(), 'GET', NULL, $this->defaultMimeType);
+    $this->assertResponse('404', 'HTTP response code is 404 when the resource does not define formats, because no route exists.');
     $this->curlClose();
   }
 
   /**
    * Tests that a resource without authentication cannot be enabled.
    */
-  public function testAuthentication() {
+  public function testAuthenticationRequired() {
+    $pref_config = $this->config('system.performance');
+    $pref_config->set('cache.page.use_internal', 0);
+    $pref_config->save();
     $settings = array(
       'entity:entity_test' => array(
         'GET' => array(
@@ -83,14 +94,37 @@ public function testAuthentication() {
     $this->config->save();
     $this->rebuildCache();
 
-    // Verify that accessing the resource returns 401.
-    $response = $this->httpRequest($this->entity->urlInfo(), 'GET', NULL, $this->defaultMimeType);
-    // AcceptHeaderMatcher considers the canonical, non-REST route a match, but
-    // a lower quality one: no format restrictions means there's always a match,
-    // and hence when there is no matching REST route, the non-REST route is
-    // used, but it can't render into application/hal+json, so it returns a 406.
-    $this->assertResponse('406', 'HTTP response code is 406 when the resource does not define formats, because it falls back to the canonical, non-REST route.');
+    $this->httpRequest($this->entity->urlInfo(), 'GET', NULL, $this->defaultMimeType);
+    $this->assertResponse('404', 'HTTP response code is 404 when the resource does not define formats, because no route exists.');
     $this->curlClose();
   }
 
+  /**
+   * Tests that a resource with authentication and a format exists.
+   */
+  public function testAccessDeniedResource() {
+    // @todo merge these methods together when the caching issues at
+    // https://www.drupal.org/node/2471473 and 404 page caching are fixed.
+    $settings = array(
+      'entity:entity_test' => array(
+        'GET' => array(
+          'supported_formats' => array(
+            'hal_json',
+          ),
+          'supported_auth' => array(
+            'cookie',
+          ),
+        ),
+      ),
+    );
+
+    // Attempt to enable the resource.
+    $this->config->set('resources', $settings);
+    $this->config->save();
+    $this->rebuildCache();
+
+    $this->httpRequest($this->entity->urlInfo(), 'GET', NULL, $this->defaultMimeType);
+    $this->assertResponse('403', 'HTTP response code is 403 when the route exists but no session cookie supplied.');
+    $this->curlClose();
+  }
 }
diff --git a/core/modules/system/src/Tests/Routing/RouteProviderTest.php b/core/modules/system/src/Tests/Routing/RouteProviderTest.php
index c9af886..d6db61a 100644
--- a/core/modules/system/src/Tests/Routing/RouteProviderTest.php
+++ b/core/modules/system/src/Tests/Routing/RouteProviderTest.php
@@ -85,6 +85,28 @@ public function testCandidateOutlines() {
     $this->assertTrue(array_key_exists('/node/5', $candidates), 'Fifth candidate found.');
     $this->assertTrue(array_key_exists('/node/%', $candidates), 'Sixth candidate found.');
     $this->assertTrue(array_key_exists('/node', $candidates), 'Seventh candidate found.');
+
+    $parts = array('node', '5');
+
+    $candidates = $provider->getCandidateOutlines($parts);
+
+    $candidates = array_flip($candidates);
+    $this->assertTrue(count($candidates) == 3, 'Correct number of candidates found');
+    $this->assertTrue(array_key_exists('/node/5', $candidates), 'First candidate found.');
+    $this->assertTrue(array_key_exists('/node/%', $candidates), 'Second candidate found.');
+    $this->assertTrue(array_key_exists('/node', $candidates), 'Third candidate found.');
+
+    $parts = array('node', '5.xml');
+
+    $candidates = $provider->getCandidateOutlines($parts);
+
+    $candidates = array_flip($candidates);
+    $this->assertTrue(count($candidates) == 5, 'Correct number of candidates found');
+    $this->assertTrue(array_key_exists('/node/%/xml', $candidates), 'First candidate found.');
+    $this->assertTrue(array_key_exists('/node/5/xml', $candidates), 'Second candidate found.');
+    $this->assertTrue(array_key_exists('/node/5.xml', $candidates), 'Third candidate found.');
+    $this->assertTrue(array_key_exists('/node/%', $candidates), 'Fourth candidate found.');
+    $this->assertTrue(array_key_exists('/node', $candidates), 'Fifth candidate found.');
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php b/core/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php
deleted file mode 100644
index d0c811c..0000000
--- a/core/tests/Drupal/Tests/Core/Routing/AcceptHeaderMatcherTest.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains Drupal\Tests\Core\Routing\AcceptHeaderMatcherTest.
- */
-
-namespace Drupal\Tests\Core\Routing;
-
-use Drupal\Core\Routing\AcceptHeaderMatcher;
-use Drupal\Tests\Core\Routing\RoutingFixtures;
-use Drupal\Tests\UnitTestCase;
-use Symfony\Component\HttpFoundation\Request;
-
-/**
- * Confirm that the mime types partial matcher is functioning properly.
- *
- * @group Routing
- */
-class AcceptHeaderMatcherTest extends UnitTestCase {
-
-  /**
-   * A collection of shared fixture data for tests.
-   *
-   * @var RoutingFixtures
-   */
-  protected $fixtures;
-
-  /**
-   * The matcher object that is going to be tested.
-   *
-   * @var \Drupal\Core\Routing\AcceptHeaderMatcher
-   */
-  protected $matcher;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    $this->fixtures = new RoutingFixtures();
-    $this->matcher = new AcceptHeaderMatcher();
-  }
-
-  /**
-   * Provides data for the Accept header filtering test.
-   *
-   * @see Drupal\Tests\Core\Routing\AcceptHeaderMatcherTest::testAcceptFiltering()
-   */
-  public function acceptFilterProvider() {
-    return [
-      // Check that JSON routes get filtered and prioritized correctly.
-      ['application/json, text/xml;q=0.9', 'json', 'route_c', 'route_e'],
-      // Tests a JSON request with alternative JSON MIME type Accept header.
-      ['application/x-json, text/xml;q=0.9', 'json', 'route_c', 'route_e'],
-      // Tests a standard HTML request.
-      ['text/html, text/xml;q=0.9', 'html', 'route_e', 'route_c'],
-    ];
-  }
-
-  /**
-   * Tests that requests using Accept headers get filtered correctly.
-   *
-   * @param string $accept_header
-   *   The HTTP Accept header value of the request.
-   * @param string $format
-   *   The request format.
-   * @param string $included_route
-   *   The route name that should survive the filter and be ranked first.
-   * @param string $excluded_route
-   *   The route name that should be filtered out during matching.
-   *
-   * @dataProvider acceptFilterProvider
-   */
-  public function testAcceptFiltering($accept_header, $format, $included_route, $excluded_route) {
-    $collection = $this->fixtures->sampleRouteCollection();
-
-    $request = Request::create('path/two', 'GET');
-    $request->headers->set('Accept', $accept_header);
-    $request->setRequestFormat($format);
-    $routes = $this->matcher->filter($collection, $request);
-    $this->assertEquals(count($routes), 4, 'The correct number of routes was found.');
-    $this->assertNotNull($routes->get($included_route), "Route $included_route was found when matching $accept_header.");
-    $this->assertNull($routes->get($excluded_route), "Route $excluded_route was not found when matching $accept_header.");
-    foreach ($routes as $name => $route) {
-      $this->assertEquals($name, $included_route, "Route $included_route is the first one in the collection when matching $accept_header.");
-      break;
-    }
-  }
-
-  /**
-   * Confirms that the AcceptHeaderMatcher throws an exception for no-route.
-   *
-   * @expectedException \Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException
-   * @expectedExceptionMessage No route found for the specified formats application/json text/xml.
-   */
-  public function testNoRouteFound() {
-    // Remove the sample routes that would match any method.
-    $routes = $this->fixtures->sampleRouteCollection();
-    $routes->remove('route_a');
-    $routes->remove('route_b');
-    $routes->remove('route_c');
-    $routes->remove('route_d');
-
-    $request = Request::create('path/two', 'GET');
-    $request->headers->set('Accept', 'application/json, text/xml;q=0.9');
-    $request->setRequestFormat('json');
-    $this->matcher->filter($routes, $request);
-    $this->matcher->filter($routes, $request);
-    $this->fail('No exception was thrown.');
-  }
-
-}
diff --git a/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php b/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php
index 4d1977c..4e8d3f6 100644
--- a/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/RouteCompilerTest.php
@@ -49,7 +49,7 @@ public function providerTestGetFit() {
       array('testwithtrailingslash/', 1),
       array('/testwithslashes/', 1),
       array('test/with/multiple/parts', 15),
-      array('test/with/{some}/slugs', 13),
+      array('test/with/%/slugs', 13),
       array('test/very/long/path/that/drupal/7/could/not/have/handled', 2047),
     );
   }
