Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JBlocks opened this issue Feb 2, 2022 · 1 comment

Comments

@JBlocks
Copy link

JBlocks commented Feb 2, 2022

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.

@etobi
Copy link

etobi commented Mar 23, 2022

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants