55 public function checkLink($url, $softRefEntry, $reference) {
58 if (isset($this->urlReports[$url])) {
59 if (!$this->urlReports[$url]) {
60 if (is_array($this->urlErrorParams[$url])) {
64 return $this->urlReports[$url];
67 'follow_redirects' => TRUE,
68 'strict_redirects' => TRUE
73 $request->setCookieJar(TRUE);
76 $response = $request->send();
77 $status = isset($response) ? $response->getStatus() : 0;
80 $request->setMethod(
'GET');
81 $request->setHeader(
'Range',
'bytes = 0 - 4048');
83 $response = $request->send();
85 }
catch (\Exception $e) {
88 if ($e->getCode() === 40) {
89 $traceUrl = $request->getUrl()->getURL();
91 $event = $request->getLastEvent();
92 if ($event[
'data'] instanceof \HTTP_Request2_Response) {
93 $traceCode = $event[
'data']->getStatus();
105 $status = isset($response) ? $response->getStatus() : 0;
106 if ($status >= 300) {
114 $this->urlReports[$url] = $isValidUrl;
127 switch ($errorType) {
129 $response = sprintf(
$GLOBALS[
'LANG']->getLL(
'list.report.externalerror'), $errorType);
132 $response =
$GLOBALS[
'LANG']->getLL(
'list.report.pageforbidden403');
135 $response =
$GLOBALS[
'LANG']->getLL(
'list.report.pagenotfound404');
138 $response =
$GLOBALS[
'LANG']->getLL(
'list.report.internalerror500');
144 $response = sprintf(
$GLOBALS[
'LANG']->getLL(
'list.report.httpexception'),
$errorParams[
'message']);
147 $response = sprintf(
$GLOBALS[
'LANG']->getLL(
'list.report.otherhttpcode'), $errorType,
$errorParams[
'message']);
161 preg_match_all(
'/((?:http|https))(?::\\/\\/)(?:[^\\s<>]+)/i', $value[
'tokenValue'], $urls, PREG_PATTERN_ORDER);
162 if (!empty($urls[0][0])) {
fetchType($value, $type, $key)
checkLink($url, $softRefEntry, $reference)
static makeInstance($className)
getErrorMessage($errorParams)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]