diff --git a/core/lib/Drupal/Core/StackMiddleware/ServerTiming.php b/core/lib/Drupal/Core/StackMiddleware/ServerTiming.php
index 4bdcbe0b48..5bb305ff29 100644
--- a/core/lib/Drupal/Core/StackMiddleware/ServerTiming.php
+++ b/core/lib/Drupal/Core/StackMiddleware/ServerTiming.php
@@ -13,7 +13,7 @@
 class ServerTiming implements HttpKernelInterface {
 
   /**
-   * The kernel.
+   * The decorated kernel.
    *
    * @var \Symfony\Component\HttpKernel\HttpKernelInterface
    */
@@ -37,7 +37,7 @@ public function handle(Request $request, $type = self::MASTER_REQUEST, $catch =
     // The request stack is already empty at this point so that
     // \Drupal::time()->getRequestMicroTime() cannot be used here.
     $duration = round(1000 * (microtime(TRUE) -  $_SERVER['REQUEST_TIME_FLOAT']), 2);
-    $response->headers->set('Server-Timing', 'total;desc="Total";dur=' . $duration);
+    $response->headers->set('Server-Timing', 'total;desc="Total";dur=' . $duration, FALSE);
     return $response;
   }
 
diff --git a/core/tests/Drupal/Tests/Core/StackMiddleware/ServerTimingTest.php b/core/tests/Drupal/Tests/Core/StackMiddleware/ServerTimingTest.php
new file mode 100644
index 0000000000..8cd6c0bf2c
--- /dev/null
+++ b/core/tests/Drupal/Tests/Core/StackMiddleware/ServerTimingTest.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\Tests\Core\StackMiddleware;
+
+use Drupal\Core\StackMiddleware\ServerTiming;
+use Drupal\Tests\UnitTestCase;
+use Symfony\Bridge\PhpUnit\ClockMock;
+use Symfony\Component\HttpFoundation\Response;
+
+/**
+ * Tests the ServerTiming middleware.
+ *
+ * @coversDefaultClass \Drupal\Core\StackMiddleware\ServerTiming
+ */
+class ServerTimingTest extends UnitTestCase {
+
+  /**
+   * Tests Server-Timing header.
+   */
+  public function testServerTiming() {
+
+    ClockMock::register(__CLASS__);
+    ClockMock::withClockMock($_SERVER['REQUEST_TIME_FLOAT'] + 0.123123);
+
+    $http_kernel = $this->createMock('Symfony\Component\HttpKernel\HttpKernelInterface');
+    $http_kernel->method('handle')->willReturn(new Response());
+    $middleware = new ServerTiming($http_kernel);
+    $request = $this->createMock('Symfony\Component\HttpFoundation\Request');
+
+    $response = $middleware->handle($request);
+    self::assertEquals('total;desc="Total";dur=123.12', $response->headers->get('Server-Timing'));
+
+    ClockMock::withClockMock(false);
+  }
+
+}
