 .../src/EventSubscriber/HtmlResponseBigPipeSubscriber.php         | 2 +-
 core/modules/big_pipe/src/Tests/BigPipeTest.php                   | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/core/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php b/core/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php
index 31d1278..2fd40fd 100644
--- a/core/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php
+++ b/core/modules/big_pipe/src/EventSubscriber/HtmlResponseBigPipeSubscriber.php
@@ -58,7 +58,7 @@ public function onRespondEarly(FilterResponseEvent $event) {
     // It does not make sense to have BigPipe responses for subrequests. BigPipe
     // is never useful internally in Drupal, only externally towards end users.
     $response = $event->getResponse();
-    $is_eligible = $event->isMasterRequest() && $response instanceof HtmlResponse;
+    $is_eligible = $response instanceof HtmlResponse;
     $event->getRequest()->attributes->set(self::ATTRIBUTE_ELIGIBLE, $is_eligible);
     if (!$is_eligible) {
       return;
diff --git a/core/modules/big_pipe/src/Tests/BigPipeTest.php b/core/modules/big_pipe/src/Tests/BigPipeTest.php
index b30d27b..9f7b26f 100644
--- a/core/modules/big_pipe/src/Tests/BigPipeTest.php
+++ b/core/modules/big_pipe/src/Tests/BigPipeTest.php
@@ -164,6 +164,10 @@ public function testBigPipe() {
     $this->pass('Verifying BigPipe assets are present…', 'Debug');
     $this->assertFalse(empty($this->getDrupalSettings()), 'drupalSettings present.');
     $this->assertTrue(in_array('big_pipe/big_pipe', explode(',', $this->getDrupalSettings()['ajaxPageState']['libraries'])), 'BigPipe asset library is present.');
+
+    // Verify that 4xx responses work fine. (4xx responses are handled by
+    // subrequests to a route pointing to a controller with the desired output.)
+    $this->drupalGet(Url::fromUri('base:non-existing-path'));
   }
 
   /**
@@ -209,6 +213,10 @@ public function testBigPipeNoJs() {
 
     $this->pass('Verifying BigPipe assets are absent…', 'Debug');
     $this->assertFalse(empty($this->getDrupalSettings()), 'drupalSettings and BigPipe asset library absent.');
+
+    // Verify that 4xx responses work fine. (4xx responses are handled by
+    // subrequests to a route pointing to a controller with the desired output.)
+    $this->drupalGet(Url::fromUri('base:non-existing-path'));
   }
 
   protected function assertBigPipeResponseHeadersPresent() {
