Bug #83611
closedLinkvalidator wrongly handles Guzzle exceptions for 40x status
100%
Description
The linkvalidator tries to use HEAD requests to test URLs for external-type links. As this method may not be allowed, it falls back to GET.
This mechanism is broken since TYPO3 8, with the introduction of Guzzle, as Guzzle does not return a proper response with a status code in case of 40x errors. Instead it throws an exception, with the HTTP status code used as exception code.
The \TYPO3\CMS\Linkvalidator\Linktype\ExternalLinktype
class needs to be adapted accordingly.
Updated by Gerrit Code Review almost 7 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/55666
Updated by Gerrit Code Review almost 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55666
Updated by Gerrit Code Review almost 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/55666
Updated by Gerrit Code Review almost 7 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/55678
Updated by Sybille Peters almost 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0ec020ccd67e9c6c4ad0437382519c722e292265.
Updated by Sybille Peters over 6 years ago
- Status changed from Resolved to New
- Assignee set to Sybille Peters
It seems this was not entirely resolved. The patch correctly handles the Guzzle exception but the behaviour should be:
Expected behaviour¶
If HEAD fails, try GET.
Current behaviour¶
What it does do currently: if HEAD fails (Exception is thrown) and Link is marked as broken.
Steps to reproduce¶
Create a link to a target with working link which will fail on HEAD, e.g.: https://www.retraitequebec.gouv.qc.ca/fr/Pages/accueil.aspx
Updated by Gerrit Code Review over 6 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/57011
Updated by Gerrit Code Review over 6 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57011
Updated by Gerrit Code Review over 6 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57011
Updated by Gerrit Code Review over 6 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57011
Updated by Gerrit Code Review over 6 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57011
Updated by Gerrit Code Review over 6 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57011
Updated by Gerrit Code Review over 6 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57011
Updated by Gerrit Code Review over 6 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57011
Updated by Gerrit Code Review over 6 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57011
Updated by Gerrit Code Review over 6 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57011
Updated by Gerrit Code Review over 6 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/57011
Updated by Gerrit Code Review over 6 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/57356
Updated by Sybille Peters over 6 years ago
- Status changed from Under Review to Resolved
Applied in changeset b2aa201255487525246603edbe6f1b0a21887650.