Skip to content

Large number of CSS & JS files - Response Header too long - HTTP Status 500 #19

Open

Description

@JBlocks

If there is a large list of CSS, JS, ... files in the TSFE context, an HTTP response code 500 is returned.
The reason is the Response Header Limit (Apache: LimitRequestFields, ...)

We should have the possibility to limit the header link: value list to a maximum of kiloBytes or a maxium of items in the list.
Alternatively, a hook or event would also be possible, so that each extension can intervene there.

We encountered the problem in our local development environment because the CSS and JavaScript components were loaded individually for the source maps instead of combined for staging and production.

At the moment we just don't see any possibility of limiting the HTTP2 resource pusher to that effect.

Activity

  1. etobi commented on Mar 23, 2022

    @etobi

    We had the same issue with an nginx reverse proxy in front of an apache webserver. The nginx complains, b/c the upstream response header got > 4k in size.

    upstream sent too big header while reading response header from upstream
    

    To solve this quickly we override ResourceMatcher to limit the number of items.

                if (count($result[$key]) > 10) {
                    $result[$key] = array_slice($result[$key], 0, 10);
                }
    

    However a better solution would be to have the choice to include/exclude items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions