Bug #88958
closedLinkvalidator: incorrect range specification
100%
Description
EXT:linkvalidator/Classes/Linktype/ExternalLinktype.php
, function checkLink
near line 88:
// HEAD was not allowed or threw an error, now trying GET $options['headers']['Range'] = 'bytes = 0 - 4048'; $isValidUrl = $this->requestUrl($url, 'GET', $options);
According to RFC 7233 there can be no spaces in range specification. Some web servers strictly follow this and throw a 416 http error.
Simple remove spaces like this:
// HEAD was not allowed or threw an error, now trying GET $options['headers']['Range'] = 'bytes=0-4048'; $isValidUrl = $this->requestUrl($url, 'GET', $options);
Updated by Dmitry Dulepov over 5 years ago
By the way, there is no need to fetch 4K of bytes. 512 or even 256 bytes will be enough.
Updated by Gerrit Code Review over 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61496
Updated by Dmitry Dulepov over 5 years ago
The fix is contributed by the University of Basel.
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61468
Updated by Gerrit Code Review over 5 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61469
Updated by Dmitry Dulepov over 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset ef3912ad3c0c4d011874cb591b1b7a3a0bcfe67d.