Revert "Issue #3300773 by bradjones1, andypost: Fix failed test on `symfony/http-foundation` 4.4.44/6.1.3 and later"
This reverts commit 9d3e26369a
.
merge-requests/2573/head
parent
2d7b035c3e
commit
92af65f8f3
|
@ -526,7 +526,7 @@
|
|||
"dist": {
|
||||
"type": "path",
|
||||
"url": "core",
|
||||
"reference": "3f775570d2780f074d69d05f95a5681c92530811"
|
||||
"reference": "4b2f5a5526e42fa659fef4ea608b5984d50d95f6"
|
||||
},
|
||||
"require": {
|
||||
"asm89/stack-cors": "^1.3",
|
||||
|
@ -559,7 +559,7 @@
|
|||
"symfony/console": "^4.4",
|
||||
"symfony/dependency-injection": "^4.4",
|
||||
"symfony/event-dispatcher": "^4.4",
|
||||
"symfony/http-foundation": "^4.4.44",
|
||||
"symfony/http-foundation": "^4.4.7",
|
||||
"symfony/http-kernel": "^4.4",
|
||||
"symfony/mime": "^5.4",
|
||||
"symfony/polyfill-iconv": "^1.25",
|
||||
|
@ -2742,16 +2742,16 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v4.4.44",
|
||||
"version": "v4.4.41",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-foundation.git",
|
||||
"reference": "9bc83c2f78949fc64503134a3139a7b055890d06"
|
||||
"reference": "27441220aebeb096b4eb8267acaaa7feb5e4266c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/9bc83c2f78949fc64503134a3139a7b055890d06",
|
||||
"reference": "9bc83c2f78949fc64503134a3139a7b055890d06",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/27441220aebeb096b4eb8267acaaa7feb5e4266c",
|
||||
"reference": "27441220aebeb096b4eb8267acaaa7feb5e4266c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2790,7 +2790,7 @@
|
|||
"description": "Defines an object-oriented layer for the HTTP specification",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v4.4.44"
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v4.4.41"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -2806,7 +2806,7 @@
|
|||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2022-07-20T09:59:04+00:00"
|
||||
"time": "2022-04-21T07:22:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
"symfony/event-dispatcher": "~v4.4.42",
|
||||
"symfony/event-dispatcher-contracts": "~v1.1.12",
|
||||
"symfony/http-client-contracts": "~v2.5.1",
|
||||
"symfony/http-foundation": "~v4.4.44",
|
||||
"symfony/http-foundation": "~v4.4.41",
|
||||
"symfony/http-kernel": "~v4.4.42",
|
||||
"symfony/mime": "~v5.4.9",
|
||||
"symfony/polyfill-ctype": "~v1.25.0",
|
||||
|
|
|
@ -15,14 +15,12 @@ use Laminas\Diactoros\Response\HtmlResponse;
|
|||
*/
|
||||
class TestControllers {
|
||||
|
||||
const LONG_TEXT = 'This is text long enough to trigger Apache mod_deflate to add a `vary: accept-encoding` header to the response.';
|
||||
|
||||
public function test() {
|
||||
return new Response('test');
|
||||
}
|
||||
|
||||
public function test1() {
|
||||
return new Response(self::LONG_TEXT);
|
||||
return new Response('test1');
|
||||
}
|
||||
|
||||
public function test2() {
|
||||
|
|
|
@ -5,7 +5,6 @@ namespace Drupal\Tests\system\Functional\Routing;
|
|||
use Drupal\Core\Cache\Cache;
|
||||
use Drupal\Core\EventSubscriber\MainContentViewSubscriber;
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
use Drupal\router_test\TestControllers;
|
||||
use Drupal\Tests\BrowserTestBase;
|
||||
use Symfony\Component\Routing\Exception\RouteNotFoundException;
|
||||
use Drupal\Core\Url;
|
||||
|
@ -39,7 +38,7 @@ class RouterTest extends BrowserTestBase {
|
|||
|
||||
// Confirm that the router can get to a controller.
|
||||
$this->drupalGet('router_test/test1');
|
||||
$this->assertSession()->pageTextContains(TestControllers::LONG_TEXT);
|
||||
$this->assertSession()->pageTextContains('test1');
|
||||
$session = $this->getSession();
|
||||
|
||||
// Check expected headers from FinishResponseSubscriber.
|
||||
|
@ -47,9 +46,7 @@ class RouterTest extends BrowserTestBase {
|
|||
$this->assertSession()->responseHeaderEquals('Content-language', 'en');
|
||||
$this->assertSession()->responseHeaderEquals('X-Content-Type-Options', 'nosniff');
|
||||
$this->assertSession()->responseHeaderEquals('X-Frame-Options', 'SAMEORIGIN');
|
||||
if (strcasecmp($session->getResponseHeader('vary'), 'accept-encoding') !== 0) {
|
||||
$this->assertSession()->responseHeaderDoesNotExist('Vary');
|
||||
}
|
||||
$this->assertSession()->responseHeaderDoesNotExist('Vary');
|
||||
|
||||
$this->drupalGet('router_test/test2');
|
||||
$this->assertSession()->pageTextContains('test2');
|
||||
|
|
Loading…
Reference in New Issue