phacility/phabricator · error · Exception
Too many redirects trying to fetch remote URI.
Error message
Too many redirects trying to fetch remote URI.
What it means
Error "Too many redirects trying to fetch remote URI." thrown in phacility/phabricator.
Source
Thrown at src/applications/files/storage/PhabricatorFile.php:597
/**
* Download a remote resource over HTTP and save the response body as a file.
*
* This method respects `security.outbound-blacklist`, and protects against
* HTTP redirection (by manually following "Location" headers and verifying
* each destination). It does not protect against DNS rebinding. See
* discussion in T6755.
*/
public static function newFromFileDownload($uri, array $params = array()) {
$timeout = 5;
$redirects = array();
$current = $uri;
while (true) {
try {
if (count($redirects) > 10) {
throw new Exception(
pht('Too many redirects trying to fetch remote URI.'));
}
$resolved = PhabricatorEnv::requireValidRemoteURIForFetch(
$current,
array(
'http',
'https',
));
list($resolved_uri, $resolved_domain) = $resolved;
$current = new PhutilURI($current);
if ($current->getProtocol() == 'http') {
// For HTTP, we can use a pre-resolved URI to defuse DNS rebinding.
$fetch_uri = $resolved_uri;
$fetch_host = $resolved_domain;
} else {View on GitHub (pinned to 5720a38cfe)
When it happens
Trigger: Thrown at src/applications/files/storage/PhabricatorFile.php:597 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/a4e5c105dd087f27.
Report an issue: GitHub.