.../src/Functional/EntityResource/EntityResourceTestBase.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index a9130c5..eac468f 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -525,11 +525,11 @@ public function testGet() { $get_headers = $response->getHeaders(); // Verify that the GET and HEAD responses are the same. The only difference - // is that there's no body. For this reason the 'Transfer-Encoding' header - // is also added to the list of headers to ignore, as this could be added to - // GET requests - depending on web server configuration. This would usually - // be 'Transfer-Encoding: chunked'. - $ignored_headers = ['Date', 'Content-Length', 'X-Drupal-Cache', 'X-Drupal-Dynamic-Cache', 'Transfer-Encoding']; + // is that there's no body. For this reason the 'Transfer-Encoding' and + // 'Vary' headers are also added to the list of headers to ignore, as they + // may be to GET requests - depending on web server configuration. They are + // usually 'Transfer-Encoding: chunked' and 'Vary: Accept-Encoding'. + $ignored_headers = ['Date', 'Content-Length', 'X-Drupal-Cache', 'X-Drupal-Dynamic-Cache', 'Transfer-Encoding', 'Vary']; foreach ($ignored_headers as $ignored_header) { unset($head_headers[$ignored_header]); unset($get_headers[$ignored_header]);