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

Command icon 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

effulgentsia created an issue. See original summary.

wim leers’s picture

Component: Page builder » Redux-integrated field widgets
Related issues: +#3454173: Media Library integration (includes introducing a new main content renderer/`_wrapper_format`)

This 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_ajax wrapper format.

I suspect that reusing 99% of it and just introducing a new AJAX command (much like class OpenModalDialogCommand extends OpenDialogCommand) could be sufficient?

wim leers’s picture

bnjmnm’s picture

Assigned: Unassigned » bnjmnm

bnjmnm’s picture

Assigned: bnjmnm » Unassigned
Status: Active » Needs review
bnjmnm’s picture

Assigned: Unassigned » traviscarden

Needs a @traviscarden signoff because of the change to openapi.yml

traviscarden’s picture

Status: Needs review » Reviewed & tested by the community

Approved!

lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Clicked the merge because it looks like there's plenty of approvals there. 🚀

q0rban’s picture

Status: Fixed » Reviewed & tested by the community

Is 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.

hooroomoo made their first commit to this issue’s fork.

hooroomoo’s picture

Assigned: traviscarden » bnjmnm
Status: Reviewed & tested by the community » Needs work

Thanks q0rban, looks like the first merge failed because of e2e tests failing. Marking to needs work.

wim leers’s picture

Issue tags: +Needs reroll
bnjmnm’s picture

Assigned: bnjmnm » Unassigned
Status: Needs work » Needs review
bnjmnm’s picture

Issue tags: -Needs reroll

effulgentsia’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.