- π«π·France GaΓ«lG Lille, France
GaΓ«lG β made their first commit to this issueβs fork.
- Status changed to Needs review
over 1 year ago 2:56pm 25 May 2023 - π«π·France GaΓ«lG Lille, France
I stumbled upon the same problem. Thank you for your time spent on this and the info sharing.
Yes, we cannot wrap only the sub-request, as you explained. But we can wrap only the main request. It seems to fix the Drupal page cache problem.
Of course, the problem of doing that is that the sub-response won't actually be cached. It seems acceptable to because I guess sub-requests only happen 403, 404,... What we want to stream are "real" pages. - last update
over 1 year ago 11 pass, 2 fail - @ga%C3%ABlg opened merge request.
- π«π·France GaΓ«lG Lille, France
My previous change introduced a bug: some placeholders where not handled, resulting in missing html elements in the page (Drupal messages in my case).
This was because we cannot assume that we can bypassHtmlResponseBigPipeSubscriber::onRespond()
just as soon as it's a subrequest.HtmlResponseBigPipeSubscriber::onRespond()
transforms the response into a BigPipeResponse if there are Big Pipe placeholders. If so, they need to be handled.
So a better solution is to avoid the creation of big pipe placeholders in case we are on a subrequest, which I did (https://git.drupalcode.org/project/big_pipe_sessionless/-/merge_requests...). Then no need to bypassHtmlResponseBigPipeSubscriber::onRespond()
.It seems to work well (pages with subrequests are still cacheable and now Drupal messages appear).
But Drupal placeholders is such a complex system that now I'm wondering if there could be placeholders into placeholders, which might result in less streamed parts than before? I don't think so and it wouldn't be such a problem, so I stop thinking about it!
- last update
over 1 year ago 11 pass, 2 fail - last update
over 1 year ago 16 pass - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Wim Leers β made their first commit to this issueβs fork.
- last update
about 1 year ago 16 pass - Status changed to Needs work
about 1 year ago 10:48am 24 October 2023 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Thanks to both of you for your work on this issue, @Driskell & @GaΓ«lG! π
Without test coverage, I cannot commit this unfortunately π
The good news is that it should be relatively straightforward to add test coverage to the existing
\Drupal\Tests\big_pipe_sessionless\Functional\BigPipeSessionlessTest::testBigPipeNoSession()
method π That happened most recently in π Pages are cached while the request policy was set to deny Fixed . Also, thanks to GitLab CI testing, the error output is much better and we can test on all supported core versions simultaneously! πIn fact, you already have a good chunk of what you need right in the issue summary:
Generate a 404 and repeat, notice Surrogate-Control always present and never get a X-Drupal-Cache HIT
I merged in upstream changes so that this MR will now also run the tests on GitLab CI π