-
-
Notifications
You must be signed in to change notification settings - Fork 72
Description
Bug Report
Current Behavior
If you have too many cache tags, the tags are truncated after 8192 characters, however the line in the generated .htaccess-file is then
Header set X-SFC-Tags "<truncated cache tags>"
which adds 28 characters and results in 8220 characters.
If that URL is accessed in the frontend an core:alert with Error reading /path/to/tx_staticfilecache/domain_443/path/to/page/.htaccess at line 14: Line too long is resulting in a HTTP error 500.
Online I found mentions that there is a max line length of 8190 characters for .htaccess files. I couldn't find a docs link for that, but this number repeats in many header relevant stuff.
Reducing that .htaccess line by a few chars resolves the error
Expected behavior/output
Environment
- TYPO3 version(s): 12
- staticfilecache version: 13.1.3
Possible Solution
adapt maxHeaderSize defaults and the hardcoded fallback value at
| $maxHeaderSize = (int) ($configurationService->get('maxHeaderSize') ?? 8192); |