From c1ec0916255814b2964b0a829545bad8f86787ad Mon Sep 17 00:00:00 2001 From: Chris McCafferty <cilefen@gmail.com> Date: Mon, 6 Mar 2017 19:35:38 -0500 Subject: [PATCH] Issue #2821711 by Wim Leers: Apache always sets Content-Type: text/html, even for DELETE requests --- .../src/Functional/EntityResource/EntityResourceTestBase.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php index 4cc0d5889890..bbdc9cefe38e 100644 --- a/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php +++ b/core/modules/rest/tests/src/Functional/EntityResource/EntityResourceTestBase.php @@ -1034,7 +1034,10 @@ public function testDelete() { // 204 for well-formed request. $response = $this->request('DELETE', $url, $request_options); $this->assertSame(204, $response->getStatusCode()); - // @todo Uncomment the following line when https://www.drupal.org/node/2821711 is fixed. + // DELETE responses should not include a Content-Type header. But Apache + // sets it to 'text/html' by default. We also cannot detect the presence of + // Apache either here in the CLI. For now having this documented here is all + // we can do. // $this->assertSame(FALSE, $response->hasHeader('Content-Type')); $this->assertSame('', (string) $response->getBody()); $this->assertFalse($response->hasHeader('X-Drupal-Cache')); -- GitLab