Bug #58145
closed
Linkvalidator - HEAD response codes
Added by Stefan Weißwange over 10 years ago.
Updated about 6 years ago.
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
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.
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
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. ;-)
- 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 http://review.typo3.org/33909
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
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- 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
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF