Skip to content
Snippets Groups Projects
Commit 7c1c60ec authored by catch's avatar catch
Browse files

Issue #3300773 by bradjones1, andypost: Fix failed test on...

Issue #3300773 by bradjones1, andypost: Fix failed test on `symfony/http-foundation` 4.4.44/6.1.3 and later

(cherry picked from commit a5929f56)
parent 0b82131c
No related branches found
No related tags found
24 merge requests!8506Draft: Issue #3456536 by ibrahim tameme,!5646Issue #3350972 by nod_: [random test failure]...,!5600Issue #3350972 by nod_: [random test failure]...,!5343Issue #3305066 by quietone, Rename RedirectLeadingSlashesSubscriber,!4350Issue #3307718: Implement xxHash for non-cryptographic use-cases,!3603#ISSUE 3346218 Add a different message on edit comment,!3555Issue #2473873: Views entity operations lack cacheability support, resulting in incorrect dropbuttons,!3494Issue #3327018 by Spokje, longwave, xjm, mondrake: Update PHPStan to 1.9.3 and...,!3410Issue #3340128: UserLoginForm::submitForm has some dead code,!3389Issue #3325184 by Spokje, andypost, xjm, smustgrave: $this->configFactory is...,!3381Issue #3332363: Refactor Claro's menus-and-lists stylesheet,!3307Issue #3326193: CKEditor 5 can grow past the viewport when there is a lot of content,!3236Issue #3332419: Refactor Claro's messages stylesheet,!3231Draft: Issue #3049525 by longwave, fougere, larowlan, kim.pepper, AaronBauman, Wim...,!3212Issue #3294003: Refactor Claro's entity-meta stylesheet,!3194Issue #3330981: Fix PHPStan L1 error "Relying on entity queries to check access by default is deprecated...",!3143Issue #3313342: [PHP 8.1] Deprecated function: strpos(): Passing null to parameter #1 LayoutBuilderUiCacheContext.php on line 28,!3024Issue #3307509: Empty option for views bulk form,!2972Issue #1845004: Replace custom password hashing library with PHP 5.5 password_hash(),!2719Issue #3110137: Remove Classy from core.,!2688Issue #3261452: [PP-1] Remove tracker module from core,!2437Issue #3238257 by hooroomoo, Wim Leers: Fragment link pointing to <textarea>...,!2296Issue #3100732: Allow specifying `meta` data on JSON:API objects,!1626Issue #3256642: Make life better for database drivers that extend another database driver
......@@ -441,7 +441,7 @@
"dist": {
"type": "path",
"url": "core",
"reference": "24e68923f64073d860bf08e6c0e412614ed40703"
"reference": "c3581356272302fa1757a8881289fd8e05c8ca07"
},
"require": {
"asm89/stack-cors": "^2.0.2",
......@@ -470,7 +470,7 @@
"symfony/console": "^6.1",
"symfony/dependency-injection": "^6.1",
"symfony/event-dispatcher": "^6.1",
"symfony/http-foundation": "^6.1.1",
"symfony/http-foundation": "^6.1.3",
"symfony/http-kernel": "^6.1",
"symfony/mime": "^6.1",
"symfony/polyfill-iconv": "^1.25",
......@@ -2216,16 +2216,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v6.1.2",
"version": "v6.1.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "86119d294e51afe4d8e07da96b63332bd1f3f52c"
"reference": "b03712c93759a81fc243ecc18ec4637958afebdb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/86119d294e51afe4d8e07da96b63332bd1f3f52c",
"reference": "86119d294e51afe4d8e07da96b63332bd1f3f52c",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/b03712c93759a81fc243ecc18ec4637958afebdb",
"reference": "b03712c93759a81fc243ecc18ec4637958afebdb",
"shasum": ""
},
"require": {
......@@ -2268,7 +2268,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v6.1.2"
"source": "https://github.com/symfony/http-foundation/tree/v6.1.3"
},
"funding": [
{
......@@ -2284,7 +2284,7 @@
"type": "tidelift"
}
],
"time": "2022-06-19T13:21:48+00:00"
"time": "2022-07-27T15:50:51+00:00"
},
{
"name": "symfony/http-kernel",
......
......@@ -35,7 +35,7 @@
"symfony/error-handler": "~v6.1.0",
"symfony/event-dispatcher": "~v6.1.0",
"symfony/event-dispatcher-contracts": "~v3.1.0",
"symfony/http-foundation": "~v6.1.2",
"symfony/http-foundation": "~v6.1.3",
"symfony/http-kernel": "~v6.1.2",
"symfony/mime": "~v6.1.1",
"symfony/polyfill-ctype": "~v1.26.0",
......
......@@ -21,7 +21,7 @@
"symfony/console": "^6.1",
"symfony/dependency-injection": "^6.1",
"symfony/event-dispatcher": "^6.1",
"symfony/http-foundation": "^6.1.1",
"symfony/http-foundation": "^6.1.3",
"symfony/http-kernel": "^6.1",
"symfony/mime": "^6.1",
"symfony/routing": "^6.1",
......
......@@ -15,12 +15,14 @@
*/
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('test1');
return new Response(self::LONG_TEXT);
}
public function test2() {
......
......@@ -5,6 +5,7 @@
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;
......@@ -38,14 +39,16 @@ public function testFinishResponseSubscriber() {
// Confirm that the router can get to a controller.
$this->drupalGet('router_test/test1');
$this->assertSession()->pageTextContains('test1');
$this->assertSession()->pageTextContains(TestControllers::LONG_TEXT);
$session = $this->getSession();
// Check expected headers from FinishResponseSubscriber.
$this->assertSession()->responseHeaderEquals('Content-language', 'en');
$this->assertSession()->responseHeaderEquals('X-Content-Type-Options', 'nosniff');
$this->assertSession()->responseHeaderEquals('X-Frame-Options', 'SAMEORIGIN');
$this->assertSession()->responseHeaderDoesNotExist('Vary');
if (strcasecmp($session->getResponseHeader('vary'), 'accept-encoding') !== 0) {
$this->assertSession()->responseHeaderDoesNotExist('Vary');
}
$this->drupalGet('router_test/test2');
$this->assertSession()->pageTextContains('test2');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment