The Needs Review Queue Bot β tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- π©πͺGermany Anybody Porta Westfalica
The upstream Symfony issue from #20 is fixed, so we could proceed here, but now it seems unclear, what's the status in Drupal 10. Is the issue still existing and is someone still using a patch from this issue?
MAYBE things might get worse if this is not fixed and we merge β¨ .htaccess ExpiresDefault (2W) is much too low. Should be ~1Y Fixed ?
- πΊπΈUnited States bkosborne New Jersey, USA
This is indeed still an issue in Drupal 10. And indeed, this patch can be simplified as we should no longer need to deal with the different case of the cache-control header anymore.
- π¦πΊAustralia sime Melbourne
Vanilla re-roll of #27 (9.x) against 10.1.x
- π¦πΊAustralia sime Melbourne
A vanilla re-roll of the patch for 11.x and running tests.
- last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago Custom Commands Failed - last update
over 1 year ago 29,402 pass - π¦πΊAustralia sime Melbourne
So that's passing, but needs reviewing feedback of #29 in #38 given upstream changes in Synfony.
- Status changed to Needs review
about 1 year ago 6:58am 18 December 2023 - Status changed to Needs work
12 months ago 7:10pm 27 December 2023 - πΊπΈUnited States smustgrave
Nitpicky stuff, can we add typehints and returns for new functions and parameters through.
Converting to an MR is also preferred if possibe
- First commit to issue fork.
- Status changed to Needs review
12 months ago 12:36am 28 December 2023 - πΊπΈUnited States angrytoast Princeton, NJ
Updated with a MR and incorporates feedback from #29 regarding no need for the case-insensitive header logic update.
Also updated with typehints for params + returns on affected / new methods as requested by #46.
- Status changed to RTBC
12 months ago 8:48pm 2 January 2024 - πΊπΈUnited States smustgrave
There was 1 error: 1) Drupal\Tests\page_cache\Functional\PageCacheTest::testCacheabilityOfRedirectResponses Behat\Mink\Exception\ExpectationException: Current response header "Cache-Control" is "", but "max-age=300, public" expected. /builds/issue/drupal-3054821/vendor/behat/mink/src/WebAssert.php:794 /builds/issue/drupal-3054821/vendor/behat/mink/src/WebAssert.php:161 /builds/issue/drupal-3054821/core/modules/page_cache/tests/src/Functional/PageCacheTest.php:577 /builds/issue/drupal-3054821/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 ERRORS! Tests: 14, Assertions: 183, Errors: 1. PHPUnit 9.6.15 by Sebastian Bergmann and contributors. Testing Drupal\Tests\Component\HttpFoundation\SecuredRedirectResponseTest . 1 / 1 (100%)
Test-only feature showed test-coverage.
Appears all feedback has been addressed.
Believe this is good.
- Status changed to Needs work
10 months ago 8:31am 21 February 2024 - π¬π§United Kingdom pobster
It needs a bit of rewriting now too, as we have AssertPageCacheContextsAndTagsTrait for enabling and checking headers. Might as well use it.
If I get time later on I'll do it...
- π§πͺBelgium Tim Lammar
Copy of patch #40 but with correct extension (without the '.txt').
Looks like this patch would be able to work on D10.2.x - π§πͺBelgium Tim Lammar
apparently my previous patch (rename from #40) would not apply to 10.2.x
Made some changes and this one should. - π¬π§United Kingdom pobster
As I was saying in #53, we have AssertPageCacheContextsAndTagsTrait available here - how would you feel about changing the test from say;
/** * Verify that the cache-control header is added by FinishResponseSubscriber. */ public function testCacheabilityOfRedirectResponses() { $config = $this->config('system.performance'); $config->set('cache.page.max_age', 300); $config->save(); $this->getSession()->getDriver()->getClient()->followRedirects(FALSE); $this->maximumMetaRefreshCount = 0; foreach ([301, 302, 303, 307, 308] as $status_code) { foreach (['local', 'cacheable', 'trusted'] as $type) { $this->drupalGet("/system-test/redirect/${type}/${status_code}"); $this->assertResponse($status_code); $this->assertHeader('Cache-Control', 'max-age=300, public'); } } }
To something like;
/** * Verify that the cache-control header is added by FinishResponseSubscriber. */ public function testCacheabilityOfRedirectResponses() { $this->enablePageCaching(); $this->getSession()->getDriver()->getClient()->followRedirects(FALSE); $this->maximumMetaRefreshCount = 0; foreach ([301, 302, 303, 307, 308] as $status_code) { foreach (['local', 'cacheable', 'trusted'] as $type) { $this->drupalGet("/system-test/redirect/${type}/${status_code}"); $this->assertResponse($status_code); $this->assertCacheMaxAge(300); } } }
- π¬π§United Kingdom longwave UK
#56 makes sense to me, we have those helpers so why not use them.
- π¦πΊAustralia RichardGaunt Melbourne
Patches rolled into the MR by Sean, hiding patches.
- π³πΏNew Zealand quietone
I read the MR with wiifm, focusing on the comments. I noticed different casing of 'Cache-Control' and the tense of a verb that should change. Those are being looked into. The code changes read well to me and are easy to understand, however I can't RTBC. I asked if the change was specific to a version of Symfony which he did not think so.
- Status changed to Needs review
9 months ago 1:09am 22 March 2024 - π¦πΊAustralia acbramley
Adding credit for contributors during the DS2024 Code sprint.
Just 1 final question left on the MR.
- Status changed to RTBC
9 months ago 2:09pm 25 March 2024 - πΊπΈUnited States smustgrave
Reverted change to SecuredRedirectResponse and tests still pass so don't believe it was needed. That resolved the last thread I believe.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Looks like a well-tested and tightly scoped change, with potentially big scalability improvements (far fewer origin requests to respond to)!
- π¬π§United Kingdom alexpott πͺπΊπ
Committed and pushed 2fbe22aa19 to 11.x and ec45fd5604 to 10.3.x. Thanks!
-
alexpott β
committed ec45fd56 on 10.3.x
Issue #3054821 by mr.baileys, wiifm, sime, angrytoast, pobster,...
-
alexpott β
committed ec45fd56 on 10.3.x
- Status changed to Fixed
9 months ago 1:43pm 29 March 2024 -
alexpott β
committed 2fbe22aa on 11.x
Issue #3054821 by mr.baileys, wiifm, sime, angrytoast, pobster,...
-
alexpott β
committed 2fbe22aa on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.