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 over 10 years ago.
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?
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.
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?!
URL's with ending slash work, but you can't force customers to enter URL's like that ;)
Thanks for your work Philipp!
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.
- 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.
- Status changed from Under Review to On Hold
- Parent task set to #13680
- 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?
Patch set 1 of change I49a7bd993e51da0cdd42b15f0bf77150bed4d556 has been pushed to the review server.
It is available at http://review.typo3.org/1705
The patch for 4.5 has not been commited yet. Maybe someone can review and push that at gerrit? (see link above)
Patch set 1 of change I0d998123a601d35cc983b13f577161f30bcd302f has been pushed to the review server.
It is available at http://review.typo3.org/2283
Patch set 2 of change I49a7bd993e51da0cdd42b15f0bf77150bed4d556 has been pushed to the review server.
It is available at http://review.typo3.org/1705
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
- Category set to Linkvalidator
Also available in: Atom
PDF