#106898InvalidArgumentException: Invalid header value for header "0"
Description
TYPO3 13 is not able to handle a large number of entries. This worked in TYPO3 12 and before, but eben TYPO3 13.4.14 dies, if I want to list a large number of entries.
Example: I want to output more then 100 entries in an extension, but there is a limit which lead to an exception.
In sysext/core/Classes/Middleware/CacheDataCollectorAttribute.php in public function process:
foreach (explode(PHP_EOL, wordwrap(implode(' ', $cacheTags), self::MAX_CACHE_TAGS_HEADER_LENGTH)) as $delta => $tags) {
$response = $response->withHeader('X-TYPO3-Cache-Tags' . ($delta > 0 ? '-' . $delta : ''), $tags);
}
The $tags will be split in 2 lines, but protected function validateHeaderValues in sysext/core/Classes/Http/Messages.php doesn´t like 2 lines.
isValidHeaderValue returns there false because of this if: if (strpbrk($value, “\r\n”) !== false)
There is a line break, because the number of results is too big.
So, how is it possible to display even with TYPO3 13 more than 100 entries?