Overview
XBEndpointRenderer adds Attach-Css, Attach-Js, and Attach-Settings response headers. While the HTTP standard doesn't set a limit for response header sizes, common web servers do; for example, by default, Apache limits to 8KB and Nginx limits to 4KB. In some cases, these Attach-* values can be larger than that; for example, see #3475652-24: Should we add SDDS to XB's Tugboat?.
Proposed resolution
While one could come up with ideas for how to work around the header size limit; for example, splitting large values into multiple headers, or trying to compress the header values, or when the value exceeds a certain size, replace it with a URL that the client can use to fetch the full header value, I think the most straightforward solution is to move these values into the response body.
In other words, change the response body from HTML to JSON, where the keys of the JSON object can be attachments and content.
User interface changes
Issue fork experience_builder-3481343
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
wim leersThis is why Drupal's AJAX response system puts this information in the response body, not the response header.
I think it'd be good to take a good hard look at why exactly we're not using core's AJAX response system and
drupal_ajaxwrapper format.I suspect that reusing 99% of it and just introducing a new AJAX command (much like
class OpenModalDialogCommand extends OpenDialogCommand) could be sufficient?Comment #3
wim leersComment #4
bnjmnmComment #6
bnjmnmComment #7
bnjmnmNeeds a @traviscarden signoff because of the change to openapi.yml
Comment #8
traviscarden commentedApproved!
Comment #9
lauriiiClicked the merge because it looks like there's plenty of approvals there. 🚀
Comment #10
q0rban commentedIs it possible that this didn't get merged in? I'm still seeing the large response headers on the 0.x branch, and it looks like MR 401 is still open.
Comment #12
hooroomooThanks q0rban, looks like the first merge failed because of e2e tests failing. Marking to needs work.
Comment #13
wim leersComment #14
bnjmnmComment #15
bnjmnmComment #17
effulgentsia commentedThanks!