Project

General

Profile

Actions

Bug #83611

closed

Linkvalidator wrongly handles Guzzle exceptions for 40x status

Added by Francois Suter over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Category:
Linkvalidator
Target version:
Start date:
2018-01-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Gerrit Code Review about 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/55666

Actions #2

Updated by Gerrit Code Review about 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/55666

Actions #3

Updated by Gerrit Code Review about 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/55666

Actions #4

Updated by Gerrit Code Review about 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/55678

Actions #5

Updated by Sybille Peters about 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Sybille Peters almost 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

Actions #7

Updated by Gerrit Code Review almost 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

Actions #8

Updated by Gerrit Code Review almost 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

Actions #9

Updated by Gerrit Code Review almost 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

Actions #10

Updated by Gerrit Code Review almost 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

Actions #11

Updated by Gerrit Code Review almost 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

Actions #12

Updated by Gerrit Code Review almost 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

Actions #13

Updated by Gerrit Code Review almost 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

Actions #14

Updated by Gerrit Code Review almost 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

Actions #15

Updated by Gerrit Code Review almost 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

Actions #16

Updated by Gerrit Code Review almost 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

Actions #17

Updated by Gerrit Code Review almost 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

Actions #18

Updated by Gerrit Code Review almost 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

Actions #19

Updated by Sybille Peters almost 6 years ago

  • Status changed from Under Review to Resolved
Actions #20

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF