Project

General

Profile

Actions

Bug #13432

closed

Feature #13680: Refactor external link, do not follow senseless loop, add user agent

404 for external links with no redirect

Added by internezzo ag over 13 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Linkvalidator
Target version:
-
Start date:
2011-02-28
Due date:
% Done:

100%

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

Description

We get a 404 error when checking www.google.ch. First we thought it might be the bug #12225. But as far as we can see, google.ch is not redirecting anywhere. Could it be, that google is blocking the linkvalidator? Maybe something to do with user-agent string?


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #13547: Special handling for HTTP 400 Bad requestClosed2011-03-02

Actions
Related to TYPO3 Core - Bug #13756: External links to big files crash TYPO3ClosedPhilipp Gampe2011-03-10

Actions
Related to TYPO3 Core - Bug #12225: External Links with Redirects are reported as 404ClosedPhilipp Gampe2011-01-14

Actions
Actions #1

Updated by Philipp Gampe over 13 years ago

Maybe something to do with user-agent string?

Possibly, but could be a TYPO3 Bug too.

Do you use curl? (enable_curl use in Install Tool?).

linkvalidator relies on the TYPO3 method t3lib_div::getURL which sometimes seems to return wrong HTTP status codes.

Actions #2

Updated by internezzo ag over 13 years ago

cURL was off. Just enabled it to test. With cURL on, www.google.ch is no longer reported as broken. But we guess this should work with cURL off too?!

Actions #3

Updated by Philipp Gampe over 13 years ago

Then this is a bug in TYPO3 core ... http://bugs.typo3.org/view.php?id=16925

Please make sure all your URLs contain an ending slash "/". So instead of google.ch write google.ch/

Actions #4

Updated by internezzo ag over 13 years ago

URL's with ending slash work, but you can't force customers to enter URL's like that ;)
Thanks for your work Philipp!

Actions #5

Updated by Dmitry Dulepov over 13 years ago

URLs with slash and without slash are technically different URLs. This, for example, is essential on sites made with Lotus Notes. Add slash and you will get a 404. So adding a slash automatically is a wrong solution.

Proper solution would be to check if there is a path in the URL or not. If there is no path ("http://google.ch"), you can append it. However you must not append a slash if the path is given.

Actions #6

Updated by Philipp Gampe over 13 years ago

  • Status changed from New to Under Review
  • Assignee set to Philipp Gampe

Thanks for your comment Dmitry. You are right that the "/" needs to be prepended before the path (the HTTP GET) if it is not there already.
But I think this should be handelt by API as linkvalidator only checks the links the user entered.

If this does not get fixed in core we need to do this ourself then and correct the link.

Second problem with this report is, that linkvalidator does not handle HTTP 400 Bad request. It should, so I will open a ticket for it.

Actions #7

Updated by Philipp Gampe over 13 years ago

  • Status changed from Under Review to On Hold
Actions #8

Updated by Philipp Gampe over 13 years ago

  • Parent task set to #13680
Actions #9

Updated by Philipp Gampe over 13 years ago

  • Status changed from On Hold to Under Review

I think this is fixed in core now. You check if this is still an issue with current dev of TYPO3 version?

Actions #10

Updated by Mr. Hudson over 13 years ago

Patch set 1 of change I49a7bd993e51da0cdd42b15f0bf77150bed4d556 has been pushed to the review server.
It is available at http://review.typo3.org/1705

Actions #11

Updated by Philipp Gampe over 13 years ago

The patch for 4.5 has not been commited yet. Maybe someone can review and push that at gerrit? (see link above)

Actions #12

Updated by Mr. Hudson over 13 years ago

Patch set 1 of change I0d998123a601d35cc983b13f577161f30bcd302f has been pushed to the review server.
It is available at http://review.typo3.org/2283

Actions #13

Updated by Mr. Hudson over 13 years ago

Patch set 2 of change I49a7bd993e51da0cdd42b15f0bf77150bed4d556 has been pushed to the review server.
It is available at http://review.typo3.org/1705

Actions #14

Updated by Philipp Gampe over 13 years ago

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

Updated by Chris topher over 12 years ago

  • Status changed from Resolved to Closed
Actions #16

Updated by Michael Stucki almost 11 years ago

  • Category set to Linkvalidator
Actions

Also available in: Atom PDF