Actions
Feature #50186
closedpageNotFound_handling should tell about misconfiguration
Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2013-07-19
Due date:
% Done:
100%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
This is the situation:
$TYPO3_CONF_VARS['SYS']['curlUse'] = '1'; $TYPO3_CONF_VARS['SYS']['curlProxyServer'] = 'mistyped_wwwproxy:81'; $TYPO3_CONF_VARS['FE']['pageNotFound_handling'] = '/index.php?id=511
Now a user tries to visit a non existing page.
When cUrl is active but proxy is not set up correctly, server-sided fetching of the 404-Page (and sending that content as 404) fails and TYPO3 redirects via 303 to that url instead. Unfortunatelly without telling anyone (FE user, log, ...) that this is due to a misconfiguration.
1944 // Prepare headers 1945 $headerArr = array( 1946 'User-agent: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('HTTP_USER_AGENT'), 1947 'Referer: ' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL') 1948 ); 1949 $res = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl($code, 1, $headerArr); 1950 // Header and content are separated by an empty line 1951 list($header, $content) = explode(CRLF . CRLF, $res, 2); 1952 $content .= CRLF; 1953 if (FALSE === $res) { 1954 // Last chance -- redirect 1955 \TYPO3\CMS\Core\Utility\HttpUtility::redirect($code);
Reading the forth (opional) parameter $report of the function getUrl could be a possible solution. In my case it returned the message "Couldn't resolve http://mistyped_wwwproxy/" or something like that. Would be nice to find this message in the backend's log module.
Actions