Bug #58145
closedLinkvalidator - HEAD response codes
100%
Description
The linkvalidator checks the response on a HEAD-request for HTTP-Status-Code 405, which does not work in some cases.
Those servers respond with a HTTP 500, so no other checks are made. We have changed this check, now all error codes (4xx, 5xx) force a second try with a GET-request. See applied diff.
BTW: There is no way to choose "Linkvalidator" in the Project-Select-Box, the issue-form disappears after choosing "Linkvalidator".
Files
Updated by Markus Klein over 10 years ago
Don't think it is a good idea to retry it for all errors. Do you know if the 500 error is produced by some specific server software?
Btw. for 6.2 we added a check for 403 already.
Updated by Stefan Weißwange over 10 years ago
Markus Klein wrote:
Don't think it is a good idea to retry it for all errors. Do you know if the 500 error is produced by some specific server software?
You're right, but at the moment we have not better idea. ;-)
As an example, try this Link http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:140:0063:0087:de:PDF. Here is a curl output, which shows the 500 error on a HEAD-request. With a GET the document is retrieved.
curl -vI http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2009:140:0063:0087:de:PDF * About to connect() to eur-lex.europa.eu port 80 (#0) * Trying 147.67.136.102... * connected * Connected to eur-lex.europa.eu (147.67.136.102) port 80 (#0) > HEAD /LexUriServ/LexUriServ.do?uri=OJ:L:2009:140:0063:0087:de:PDF HTTP/1.1 > User-Agent: curl/7.26.0 > Host: eur-lex.europa.eu > Accept: */* > * additional stuff not fine transfer.c:1037: 0 0 * HTTP 1.1 or later with persistent connection, pipelining supported < HTTP/1.1 500 Internal Server Error HTTP/1.1 500 Internal Server Error < Date: Thu, 24 Apr 2014 08:43:54 GMT Date: Thu, 24 Apr 2014 08:43:54 GMT < Content-Type: text/html; charset=UTF-8 Content-Type: text/html; charset=UTF-8 < Content-Language: en Content-Language: en < Server: Europa Server: Europa < Set-Cookie: JSESSIONID=jJt6TYTKTCMvL0xt9XPGgDlpRPzh9T8w2FXwnyZ7tVQM5GvqfhQ1!-1614442047; path=/; HttpOnly Set-Cookie: JSESSIONID=jJt6TYTKTCMvL0xt9XPGgDlpRPzh9T8w2FXwnyZ7tVQM5GvqfhQ1!-1614442047; path=/; HttpOnly < Proxy-Connection: Keep-Alive Proxy-Connection: Keep-Alive < Connection: Keep-Alive Connection: Keep-Alive * no chunk, no close, no size. Assume close to signal end < * Closing connection #0
Updated by Markus Klein over 10 years ago
Hm, ok.
Maybe the server does not like the user-agent.
Can you prepare a patch?
http://wiki.typo3.org/CWT
Updated by Stefan Weißwange over 10 years ago
Markus Klein wrote:
Hm, ok.
Maybe the server does not like the user-agent.
No, I tried some "standard" agents with curl with the same result.
Can you prepare a patch?
http://wiki.typo3.org/CWT
Ok, I'll give it a try. ;-)
Updated by Gerrit Code Review over 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch TYPO3_6-1 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/29640
Updated by Gerrit Code Review about 10 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33909
Updated by Gerrit Code Review about 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33909
Updated by Stefan Weißwange about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 6c1e6e60eecd474419817780f2beea2e8a7c233c.
Updated by Gerrit Code Review almost 10 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35025
Updated by Stefan Weißwange almost 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset 56730ee9cea5d4822513ae954c9426807304aae2.